Skip to content

Commit

Permalink
fix: Swap transform/object and observek8sattributes processors
Browse files Browse the repository at this point in the history
The observek8sattributes processor might edit the log body in-place,
which might affect the value of facets computed by transform/object.

Therefore, we swap the two processors in the pipeline to make sure
observek8sattributes always acts before transform/object.
  • Loading branch information
obs-gh-enricogiorio committed Nov 12, 2024
1 parent f565152 commit c98d16e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: agent
description: Chart to install K8s collection stack based on Observe Agent
type: application
version: 0.30.3
version: 0.30.4
appVersion: "1.1.0"
dependencies:
- name: opentelemetry-collector
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# agent

![Version: 0.30.3](https://img.shields.io/badge/Version-0.30.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)
![Version: 0.30.4](https://img.shields.io/badge/Version-0.30.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)

> [!CAUTION]
> This chart is under active development and is not meant to be installed yet.
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/_cluster-events-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ service:
pipelines:
logs/objects:
receivers: [k8sobjects/objects]
processors: [memory_limiter, batch, resource/observe_common, transform/object, observek8sattributes]
processors: [memory_limiter, batch, resource/observe_common, observek8sattributes, transform/object]
exporters: [otlphttp/observe/entity, debug/override]
logs/cluster:
receivers: [k8sobjects/cluster]
Expand Down
3 changes: 2 additions & 1 deletion charts/agent/templates/_config-processors.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ memory_limiter:
spike_limit_percentage: 25
{{- end -}}

# This processor might edit the log body in-place, which might affect the output of transform/object.
# Therefore, this processor must always be placed before transform/object in the pipeline.
{{- define "config.processors.attributes.observek8sattributes" -}}
# needs to come after transform/watch_objects in pipelines
observek8sattributes:
{{- end -}}

0 comments on commit c98d16e

Please sign in to comment.