-
Notifications
You must be signed in to change notification settings - Fork 25
feature(otel-collector): ordered processors list #910
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,9 +44,15 @@ data: | |
| - otlp | ||
| {{- if .Values.openTelemetry.gateway.config.traces.processors }} | ||
| processors: | ||
| {{- if .Values.openTelemetry.gateway.config.traces.processorOrderedList }} | ||
| {{- range .Values.openTelemetry.gateway.config.traces.processorOrderedList }} | ||
| - {{ . }} | ||
| {{- end }} | ||
| {{- else }} | ||
| {{- range $key, $val := .Values.openTelemetry.gateway.config.traces.processors }} | ||
| - {{ $key }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
Comment on lines
+47
to
+55
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bobheadxi currently processorOrderedList only sets the order, not defines the processors. If you think having them separated is better, we need to make list with full definitions, similar to https://sourcegraph.sourcegraph.com/r/github.com/sourcegraph/deploy-sourcegraph-helm/-/blob/charts/sourcegraph/values.yaml?L667 - if you think this is more clear, I can refactor?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hm
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be called pipeline then. in OTEL the concepts are separate, pipelines are "do things in this order" while what processors are available, are configured separately
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also, it seems like here we assume all processors apply to all signals, is that right? we need to separate them to stay true to OTEL, because not every pipeline needs to apply to every signal, and most importantly, not every pipeline is compatible with every signal eg you can have the following see https://opentelemetry.io/docs/collector/configuration/#processors
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so I think we should say:
|
||
| {{- end }} | ||
| exporters: | ||
| {{- range $key, $val := .Values.openTelemetry.gateway.config.traces.exporters }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| --- | ||
| suite: otelCollectorProcessors | ||
| templates: | ||
| - otel-collector/otel-collector.ConfigMap.yaml | ||
| set: | ||
| openTelemetry: | ||
| gateway: | ||
| config: | ||
| traces: | ||
| exporters: | ||
| otlp: | ||
| endpoint: "otlp.service.com:443" | ||
| tests: | ||
| - it: should not render a processors section when none are configured | ||
| asserts: | ||
| - notMatchRegex: | ||
| path: data["config.yaml"] | ||
| pattern: "processors:" | ||
| - it: should order pipeline processors by map key when processorOrderedList is not set | ||
| set: | ||
| openTelemetry: | ||
| gateway: | ||
| config: | ||
| traces: | ||
| processors: | ||
| memory_limiter: | ||
| check_interval: 1s | ||
| batch: | ||
| timeout: 1s | ||
| asserts: | ||
| - matchRegex: | ||
| path: data["config.yaml"] | ||
| pattern: "processors:\\s*\\n\\s*- batch\\s*\\n\\s*- memory_limiter" | ||
| - it: should order pipeline processors using processorOrderedList when set | ||
| set: | ||
| openTelemetry: | ||
| gateway: | ||
| config: | ||
| traces: | ||
| processors: | ||
| memory_limiter: | ||
| check_interval: 1s | ||
| batch: | ||
| timeout: 1s | ||
| processorOrderedList: | ||
| - memory_limiter | ||
| - batch | ||
| asserts: | ||
| - matchRegex: | ||
| path: data["config.yaml"] | ||
| pattern: "processors:\\s*\\n\\s*- memory_limiter\\s*\\n\\s*- batch" | ||
| - it: should still define processor configs regardless of ordering source | ||
| set: | ||
| openTelemetry: | ||
| gateway: | ||
| config: | ||
| traces: | ||
| processors: | ||
| memory_limiter: | ||
| check_interval: 1s | ||
| batch: | ||
| timeout: 1s | ||
| processorOrderedList: | ||
| - memory_limiter | ||
| - batch | ||
| asserts: | ||
| - matchRegex: | ||
| path: data["config.yaml"] | ||
| pattern: "check_interval: 1s" | ||
| - matchRegex: | ||
| path: data["config.yaml"] | ||
| pattern: "timeout: 1s" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't this mean without
processors,processorOrderedListdoes not work?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, processorOrderedList is just addition to processors, not replacement, pls see above comment/