Skip to content

feat(helm v5): Make k8sattributes processor as default and deprecate k8s_tagger for k8s metadata enrichment#4093

Open
jagan2221 wants to merge 26 commits intomainfrom
helmv5/k8s_tagger
Open

feat(helm v5): Make k8sattributes processor as default and deprecate k8s_tagger for k8s metadata enrichment#4093
jagan2221 wants to merge 26 commits intomainfrom
helmv5/k8s_tagger

Conversation

@jagan2221
Copy link
Contributor

@jagan2221 jagan2221 commented Mar 5, 2026

What changed?
Made k8sattributes processor as default and deprecate k8s_tagger for logs,metrics and traces pipelines. It can be enabled again via *.useSumok8sprocessor flag
We will remove k8s_tagger completely in v6 helm chart.

Changes to note:

  1. For metrics, added 2 new flags use extractPodLabels and extractNodeLabels. Reason is for metrics, any field(attribute) with high cardinal values will increase metrics cardinality and metrics backend has a limit on high cardinality metrics.
    pod labels and node labels are the fields which increases high cardinality.
    k8s_tagger was already adding pod labels, but nodelabels are newly added in k8sattributes processor and we don't want to add nodelabels by default.

So, kept the flag values as for k8sattributes,
extractPodLabels = true (Retain podlabels as like k8s_tagger)
extractNodeLabels = false (Disable nodelabels since k8s_tagger didn't added that earlier)

Comparison of enrichment done by k8s_tagger vs k8s_attributes processor. Nodelabels included in this for test, but in our change has nodelabels disabled.

  1. For traces, introduced k8sattributes processor and made it default. Important thing to review is the pod association config of k8sattributes processor for traces. Made it similar to k8s_tagger pod association.
  • Changelog updated or skip changelog label added
  • Documentation updated (Readme added, will be documented in Helm v5 - how to upgrade doc)
  • Template tests added for new features
  • Integration tests added or modified for major features

@jagan2221 jagan2221 changed the title feat(helmv5): Make k8sattributes processor as default and deprecate k8s_tagger(sumo) feat(helm v5): Make k8sattributes processor as default and deprecate k8s_tagger(sumo) Mar 5, 2026
@jagan2221 jagan2221 changed the title feat(helm v5): Make k8sattributes processor as default and deprecate k8s_tagger(sumo) feat(helm v5): Make k8sattributes processor as default and deprecate k8s_tagger for k8s metadata enrichment Mar 5, 2026
@jagan2221 jagan2221 marked this pull request as ready for review March 9, 2026 04:00
@jagan2221 jagan2221 requested a review from a team as a code owner March 9, 2026 04:00
@jagan2221 jagan2221 added the osc label Mar 9, 2026
@@ -0,0 +1 @@
feat(helm v5): Make k8sattributes processor as default and deprecate k8s_tagger for k8s metadata enrichment
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if this change is being pushed before helm v5, then I would suggest we remove v5 references from here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be pushed in v5 only. We'll keep this reviewed and ready and then merge all helm v5 PR's at once.

traces:
receivers: [jaeger, otlp, otlp/deprecated, zipkin]
processors: [memory_limiter, k8s_tagger, source, resource, batch]
processors: [memory_limiter, {{ if .Values.otelcolInstrumentation.useSumoK8sProcessor }}k8s_tagger{{ else }}k8sattributes{{ end }}, source, resource, batch]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it be a valid config if useSumoK8sProcessor is not enabled. Just wanted to make sure that we don't end up with "memory_limiter,,source" and end up erroring out at the collector start.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, if useSumoK8sProcessor is disabled by default in our values, so k8sattributes will be chosen. There will always be useSumoK8sProcessor either true/false.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes k8sattributes (the upstream OpenTelemetry k8s metadata enrichment processor) the default instead of the deprecated SumoLogic-specific k8s_tagger processor for all three telemetry pipelines: logs, metrics, and traces. The k8s_tagger can still be opted into via the *.useSumoK8sProcessor: true flag and is planned for complete removal in helm chart v6.

Changes:

  • Set useSumoK8sProcessor: false as the new default for metadata.logs, metadata.metrics, and otelcolInstrumentation, adding the new k8sattributes processor configuration block for each pipeline
  • Added two new flags (extractPodLabels, extractNodeLabels) under metadata.metrics to control metrics cardinality when using k8sattributes
  • Updated all Helm golden file tests and integration tests to reflect the new default processor and the new labels it produces (notably service.namespace)

Reviewed changes

Copilot reviewed 38 out of 39 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
deploy/helm/sumologic/values.yaml Changes defaults of useSumoK8sProcessor to false and adds extractPodLabels/extractNodeLabels flags; contains stale/incorrect comments
deploy/helm/sumologic/conf/instrumentation/otelcol.instrumentation.conf.yaml Adds k8sattributes processor configuration for traces/metrics pipelines when useSumoK8sProcessor is false
deploy/helm/sumologic/conf/metrics/otelcol/processors.yaml Adds k8sattributes configuration for metrics pipeline with conditional pod/node label extraction
deploy/helm/sumologic/conf/logs/otelcol/config.yaml Adds secondary pod_association rule (namespace+name compound key) for the logs k8sattributes config
deploy/helm/sumologic/README.md Adds documentation for new useSumoK8sProcessor, waitForMetadata*, extractPodLabels, and extractNodeLabels fields
tests/helm/testdata/goldenfile/metadata_*_otc/*.output.yaml Updates golden files to reflect k8sattributes as new default processor
tests/helm/testdata/goldenfile/otelcol-instrumentation-config/*.output.yaml Updates golden files for instrumentation config to use k8sattributes
tests/helm/metrics_test.go Updates pipeline processor name assertion from k8s_tagger to k8sattributes
tests/integration/features.go Adds service.namespace to expected metric labels; removes node labels (now disabled by default)
tests/integration/internal/constants.go Moves node-related OTel metrics from dedicated list to FlakyMetrics
tests/integration/helm_k8s_processor_test.go Removes NodeLabelsMetrics from expected metrics (now disabled by default)
tests/integration/values/values_helm_k8s_processor.yaml Adds explicit extractPodLabels/extractNodeLabels flags (now redundant since they're defaults)
tests/helm/testdata/goldenfile/metadata_logs_otc/k8sattributes.output.yaml Adds secondary pod_association rule
tests/helm/testdata/goldenfile/metrics-server/basic.output.yaml Unrelated reordering of resource and dnsPolicy fields
.changelog/4093.changed.txt Adds changelog entry

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@raunakmandaokar
Copy link
Collaborator

LGTM, Check co-pilot comments regarding empty labels scenario and add the test case if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants