diff --git a/CHANGELOG.md b/CHANGELOG.md index b2062a706..38faadf3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +### Changed + +- Migrate filelog operators to follow opentelemetry-log-collection v0.29.0 changes ([#436](https://github.com/signalfx/splunk-otel-collector-chart/pull/436)) + - [BREAKING CHANGE] Several breaking changes were made that affect the + filelog, syslog, tcplog, udplog, and journald receivers. Any use of the + [extraFileLogs](https://github.com/signalfx/splunk-otel-collector-chart/blob/941ad7f255cce585f4c06dd46c0cd63ef57d9903/helm-charts/splunk-otel-collector/values.yaml#L488) config, [logsCollection.containers.extraOperators](https://github.com/signalfx/splunk-otel-collector-chart/blob/941ad7f255cce585f4c06dd46c0cd63ef57d9903/helm-charts/splunk-otel-collector/values.yaml#L431) config, + and affected receivers in a custom manner should be reviewed. See + [upgrading guidelines](https://github.com/open-telemetry/opentelemetry-log-collection/blob/v0.29.0/CHANGELOG.md#upgrading-to-v0290) + ## [0.48.0] - 2022-04-13 ### Changed diff --git a/helm-charts/splunk-otel-collector/templates/_helpers.tpl b/helm-charts/splunk-otel-collector/templates/_helpers.tpl index be75ad68a..b7a712423 100644 --- a/helm-charts/splunk-otel-collector/templates/_helpers.tpl +++ b/helm-charts/splunk-otel-collector/templates/_helpers.tpl @@ -250,15 +250,15 @@ Create a filter expression for multiline logs configuration. {{- $expr := "" }} {{- if .namespaceName }} {{- $useRegexp := eq (toString .namespaceName.useRegexp | default "false") "true" }} -{{- $expr = cat "($$resource[\"k8s.namespace.name\"])" (ternary "matches" "==" $useRegexp) (quote .namespaceName.value) "&&" }} +{{- $expr = cat "(resource[\"k8s.namespace.name\"])" (ternary "matches" "==" $useRegexp) (quote .namespaceName.value) "&&" }} {{- end }} {{- if .podName }} {{- $useRegexp := eq (toString .podName.useRegexp | default "false") "true" }} -{{- $expr = cat $expr "($$resource[\"k8s.pod.name\"])" (ternary "matches" "==" $useRegexp) (quote .podName.value) "&&" }} +{{- $expr = cat $expr "(resource[\"k8s.pod.name\"])" (ternary "matches" "==" $useRegexp) (quote .podName.value) "&&" }} {{- end }} {{- if .containerName }} {{- $useRegexp := eq (toString .containerName.useRegexp | default "false") "true" }} -{{- $expr = cat $expr "($$resource[\"k8s.container.name\"])" (ternary "matches" "==" $useRegexp) (quote .containerName.value) "&&" }} +{{- $expr = cat $expr "(resource[\"k8s.container.name\"])" (ternary "matches" "==" $useRegexp) (quote .containerName.value) "&&" }} {{- end }} {{- $expr | trimSuffix "&&" | trim }} {{- end -}} diff --git a/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl b/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl index 2cfc6f9f3..315894e0f 100644 --- a/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl +++ b/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl @@ -261,11 +261,11 @@ receivers: id: get-format routes: - output: parser-docker - expr: '$$body matches "^\\{"' + expr: 'body matches "^\\{"' - output: parser-crio - expr: '$$body matches "^[^ Z]+ "' + expr: 'body matches "^[^ Z]+ "' - output: parser-containerd - expr: '$$body matches "^[^ Z]+Z"' + expr: 'body matches "^[^ Z]+Z"' {{- end }} {{- if or (not .Values.logsCollection.containers.containerRuntime) (eq .Values.logsCollection.containers.containerRuntime "cri-o") }} # Parse CRI-O format @@ -273,18 +273,18 @@ receivers: id: parser-crio regex: '^(?P