Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-v3] fix(logs)!: move JSON parsing after user-defined processors #3288

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changelog/3281.fixed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fix(logs)!: move JSON parsing after user-defined processors

The log body will now always be a string if accessed in extra processors.
Users who want to access specific fields in their parsed JSON log
should explicitly call ParseJSON in their processor definition.
2 changes: 1 addition & 1 deletion deploy/helm/sumologic/conf/logs/otelcol/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -583,12 +583,12 @@ service:
- resource/containers_copy_node_to_host
- sumologic_schema
- source/containers
- transform/containers_parse_json
{{- if .Values.sumologic.logs.container.otelcol.extraProcessors }}
{{- range $processor := .Values.sumologic.logs.container.otelcol.extraProcessors }}
{{ printf "- %s" ( $processor | keys | first ) | indent 8 }}
{{- end }}
{{- end }}
- transform/containers_parse_json
- resource/remove_pod_name
- resource/drop_annotations
- transform/add_timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@ data:
- resource/containers_copy_node_to_host
- sumologic_schema
- source/containers
- transform/containers_parse_json
- resource/add-resource-attribute-container
- resource/remove-container
- transform/containers_parse_json
- resource/remove_pod_name
- resource/drop_annotations
- transform/add_timestamp
Expand Down