Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5463c66
make k8sattributes processor as default
jagan2221 Mar 5, 2026
1f3b963
remove unwanted changes
jagan2221 Mar 5, 2026
fc7c71f
Create 4093.changed.txt
jagan2221 Mar 5, 2026
21e3c69
fix yaml lint and ci
jagan2221 Mar 5, 2026
6e0a4b9
Merge branch 'helmv5/k8s_tagger' of https://github.com/SumoLogic/sumo…
jagan2221 Mar 5, 2026
31ce3df
IT fixes
jagan2221 Mar 5, 2026
7eea19c
fix it
jagan2221 Mar 5, 2026
730b600
IT fix 2
jagan2221 Mar 5, 2026
2b3ed07
IT fixes 3
jagan2221 Mar 5, 2026
0471763
IT fix 4
jagan2221 Mar 5, 2026
1c88af3
IT fix 4
jagan2221 Mar 5, 2026
3cdc361
IT fix 6
jagan2221 Mar 5, 2026
aa66e1d
IT fix 6
jagan2221 Mar 5, 2026
769325a
IT fix 7
jagan2221 Mar 5, 2026
daf14b2
IT fix 7: add fallback pod_association for k8sattributes logs pipeline
jagan2221 Mar 5, 2026
8e5cb0e
IT fix 8: add service.namespace to non-pod kube-state-metrics expecte…
jagan2221 Mar 5, 2026
e24b181
IT fix 9: relax service label regex for pod kube-state-metrics check
jagan2221 Mar 5, 2026
d348ed2
IT fix 10: use connection-based pod association for instrumentation k…
jagan2221 Mar 5, 2026
20e56c1
IT fix 9
jagan2221 Mar 5, 2026
8adcd45
fix(lint): gofmt formatting in integration test files
jagan2221 Mar 5, 2026
9a9a416
Update features.go
jagan2221 Mar 5, 2026
a83b235
Merge branch 'main' into helmv5/k8s_tagger
jagan2221 Mar 9, 2026
482d19c
fix readme
jagan2221 Mar 9, 2026
6eea7b5
Update helm_ot_default_ipv6_test.go
jagan2221 Mar 9, 2026
64558ff
Update values.yaml
jagan2221 Mar 9, 2026
8f21641
Update processors.yaml
jagan2221 Mar 9, 2026
9347127
Update processors.yaml
jagan2221 Mar 19, 2026
2c41342
fix golden tests
jagan2221 Mar 19, 2026
832c04a
Update 4093.changed.txt
jagan2221 Mar 20, 2026
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
1 change: 1 addition & 0 deletions .changelog/4093.changed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat(helm v5): Make k8sattributes processor as default and deprecate k8s_tagger for k8s metadata enrichment
9 changes: 7 additions & 2 deletions deploy/helm/sumologic/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ processors:
timeout: 10s

## Tags spans with K8S metadata, basing on the context IP
{{ if .Values.otelcolInstrumentation.useSumoK8sProcessor }}
k8s_tagger:
## When true, only IP is assigned and passed (so it could be tagged on another collector)
passthrough: false
Expand Down Expand Up @@ -145,6 +146,57 @@ processors:
labels:
- tag_name: "k8s.pod.label.%s"
key: "*"
{{ else }}
k8sattributes:
wait_for_metadata: {{ .Values.otelcolInstrumentation.waitForMetadata }}
wait_for_metadata_timeout: {{ .Values.otelcolInstrumentation.waitForMetadataTimeout | quote }}
auth_type: "serviceAccount"
extract:
labels:
- key_regex: "(.*)"
tag_name: "k8s.pod.label.$$1"
from: pod
- key_regex: "(.*)"
tag_name: "k8s.namespace.label.$$1"
from: namespace
annotations:
- key_regex: "(.*)"
tag_name: "k8s.pod.annotation.$$1"
from: pod
metadata:
## extract the following well-known metadata fields
- k8s.pod.name
- k8s.pod.uid
- k8s.deployment.name
- k8s.daemonset.name
- k8s.replicaset.name
- k8s.statefulset.name
- k8s.namespace.name
- k8s.node.name
- k8s.container.name
- service.name
- service.namespace
## Has to be false to enrich metadata
passthrough: false
pod_association:
## Mirrors the k8s_tagger default association order (pod_association.go)
## https://github.com/SumoLogic/sumologic-otel-collector/blob/main/pkg/processor/k8sprocessor/pod_association.go#L44
## k8sIPLabelName (k8s.pod.ip) → clientIPLabelName (ip) → connection → host.name (if IP)
## We prepend k8s.pod.uid as the most explicit match, then follow k8s_tagger's order.
## k8s.pod.ip and ip survive gateway hops (forwarded as resource attributes);
## connection uses the TCP source IP and only works for direct pod→collector connections.
- sources:
- from: resource_attribute
name: k8s.pod.uid
- sources:
- from: resource_attribute
name: k8s.pod.ip
- sources:
- from: resource_attribute
name: ip
- sources:
- from: connection
{{ end }}

## The memory_limiter processor is used to prevent out of memory situations on the collector.
memory_limiter:
Expand Down Expand Up @@ -179,7 +231,7 @@ service:
pipelines:
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]
exporters:
{{- if eq .Values.tracesGateway.enabled true }}
- otlphttp/traces
Expand All @@ -191,7 +243,7 @@ service:
{{- end }}
metrics:
receivers: [otlp, otlp/deprecated]
processors: [memory_limiter, k8s_tagger, source, resource, batch]
processors: [memory_limiter, {{ if .Values.otelcolInstrumentation.useSumoK8sProcessor }}k8s_tagger{{ else }}k8sattributes{{ end }}, source, resource, batch]
exporters:
- sumologic/metrics
{{- if eq .Values.debug.instrumentation.otelcolInstrumentation.print true }}
Expand Down
12 changes: 12 additions & 0 deletions deploy/helm/sumologic/conf/logs/otelcol/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,21 @@ processors:
## Has to be false to enrich metadata
passthrough: false
pod_association:
## Mirrors k8s_tagger's `build_hostname` association (pod_association.go):
## build_hostname combined k8s.pod.name + k8s.namespace.name into a single
## compound key "{podName}.{namespace}" for pod cache lookup.
## k8sattributes two-source match achieves the same uniqueness guarantee:
## both sources must match simultaneously, equivalent to the compound key.
## k8s.pod.uid is prepended as a more precise fallback when set (e.g. via
## the filelog receiver which parses the UID from the log file path).
- sources:
- from: resource_attribute
name: k8s.pod.uid
- sources:
- from: resource_attribute
name: k8s.namespace.name
- from: resource_attribute
name: k8s.pod.name
{{ end }}
{{ end }}

Expand Down
11 changes: 11 additions & 0 deletions deploy/helm/sumologic/conf/metrics/otelcol/processors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ k8sattributes:
auth_type: "serviceAccount"
extract:
labels:
{{- if .Values.metadata.metrics.extractPodLabels }}
- key_regex: "(.*)"
tag_name: "pod_labels_$$1"
from: pod
{{- end }}
{{- if .Values.metadata.metrics.extractNodeLabels }}
- key_regex: "(.*)"
tag_name: "node_labels_$$1"
from: node
{{- end }}
metadata:
## extract the following well-known metadata fields
- k8s.pod.name
Expand All @@ -80,6 +84,13 @@ k8sattributes:
## Has to be false to enrich metadata
passthrough: false
pod_association:
## Mirrors k8s_tagger's `build_hostname` association (pod_association.go):
## build_hostname combined k8s.pod.name + k8s.namespace.name into a single
## compound key "{podName}.{namespace}" for pod cache lookup.
## k8sattributes two-source match achieves the same uniqueness guarantee:
## both sources must match simultaneously, equivalent to the compound key.
## Metrics from OtelOperator scraping always carry pod name + namespace
## (set by the prometheus receiver from target labels), so no uid fallback needed.
- sources:
- from: resource_attribute
name: k8s.pod.name
Expand Down
26 changes: 24 additions & 2 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,14 @@ otelcolInstrumentation:
## Matching pods will be excluded from Sumo. The logs will still be sent to otelcol.
excludePodRegex: ""

## Use the sumologic k8s processor to add metadata to traces.
## This is disabled by default, but can be disabled if you want to use the upstream processor.
useSumoK8sProcessor: false

## Only used if useSumoK8sProcessor is set to false
waitForMetadata: true
waitForMetadataTimeout: 10s

## Option to turn autoscaling on for otelcol and specify params for HPA.
## Autoscaling needs metrics-server to access cpu metrics.
autoscaling:
Expand Down Expand Up @@ -1648,12 +1656,26 @@ metadata:

## Use the sumologic k8s processor to add metadata to the logs.
## This is enabled by default, but can be disabled if you want to use the upstream processor.
useSumoK8sProcessor: true
useSumoK8sProcessor: false

## Only used if useSumoK8sProcessor is set to false
waitForMetadata: true
waitForMetadataTimeout: 10s

## Extract pod labels as resource attributes
## Pod labels include: app, version, tier, component, etc.
## Default: true
## Only used if useSumoK8sProcessor is set to false
extractPodLabels: true

## Extract node labels as resource attributes
## WARNING: Node labels significantly increase metric cardinality
## Cloud providers add 50-100 labels per node (instance-type, zone, etc.)
## Example impact: 100 nodes × 50 labels = 5,000+ additional label combinations
## Default: false
## Only used if useSumoK8sProcessor is set to false
extractNodeLabels: false

config:
## Directly alter the OT configuration. The value of this key should be a dictionary, that will
## be directly merged with the generated configuration, overriding existing values.
Expand Down Expand Up @@ -1766,7 +1788,7 @@ metadata:

## Use the sumologic k8s processor to add metadata to the logs.
## This is enabled by default, but can be disabled if you want to use the upstream processor.
useSumoK8sProcessor: true
useSumoK8sProcessor: false

## Only used if useSumoK8sProcessor is set to false
waitForMetadata: true
Expand Down
2 changes: 1 addition & 1 deletion tests/helm/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func TestMetadataMetricsOtelConfigExtraProcessors(t *testing.T) {
"metricstransform",
"groupbyattrs",
"resource",
"k8s_tagger",
"k8sattributes",
"source",
"sumologic",
"filter/1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,34 +155,53 @@ data:
- _sourceName
- _sourceHost
- _collector
k8s_tagger:
k8sattributes:
auth_type: serviceAccount
extract:
annotations:
- key: '*'
tag_name: pod_annotations_%s
delimiter: _
- from: pod
key_regex: (.*)
tag_name: pod_annotations_$$1
- from: namespace
key_regex: (.*)
tag_name: namespace_annotations_$$1
- from: node
key_regex: (.*)
tag_name: node_annotations_$$1
labels:
- key: '*'
tag_name: pod_labels_%s
- from: pod
key_regex: (.*)
tag_name: pod_labels_$$1
- from: namespace
key_regex: (.*)
tag_name: namespace_labels_$$1
- from: node
key_regex: (.*)
tag_name: node_labels_$$1
metadata:
- daemonSetName
- deploymentName
- hostName
- namespace
- nodeName
- podName
- serviceName
- statefulSetName
namespace_annotations:
- key: '*'
tag_name: namespace_annotations_%s
namespace_labels:
- key: '*'
tag_name: namespace_labels_%s
owner_lookup_enabled: true
- k8s.pod.name
- k8s.pod.uid
- k8s.pod.hostname
- k8s.deployment.name
- k8s.daemonset.name
- k8s.replicaset.name
- k8s.statefulset.name
- k8s.namespace.name
- k8s.node.name
- service.name
- service.namespace
passthrough: false
pod_association:
- from: build_hostname
- sources:
- from: resource_attribute
name: k8s.pod.uid
- sources:
- from: resource_attribute
name: k8s.namespace.name
- from: resource_attribute
name: k8s.pod.name
wait_for_metadata: true
wait_for_metadata_timeout: 10s
memory_limiter:
check_interval: 5s
limit_percentage: 90
Expand Down Expand Up @@ -298,7 +317,7 @@ data:
- memory_limiter
- filter/include_containers
- groupbyattrs/containers
- k8s_tagger
- k8sattributes
- resource/add_cluster
- resource/set_empty_source_metadata
- resource/containers_copy_node_to_host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,34 +164,53 @@ data:
- _sourceName
- _sourceHost
- _collector
k8s_tagger:
k8sattributes:
auth_type: serviceAccount
extract:
annotations:
- key: '*'
tag_name: pod_annotations_%s
delimiter: _
- from: pod
key_regex: (.*)
tag_name: pod_annotations_$$1
- from: namespace
key_regex: (.*)
tag_name: namespace_annotations_$$1
- from: node
key_regex: (.*)
tag_name: node_annotations_$$1
labels:
- key: '*'
tag_name: pod_labels_%s
- from: pod
key_regex: (.*)
tag_name: pod_labels_$$1
- from: namespace
key_regex: (.*)
tag_name: namespace_labels_$$1
- from: node
key_regex: (.*)
tag_name: node_labels_$$1
metadata:
- daemonSetName
- deploymentName
- hostName
- namespace
- nodeName
- podName
- serviceName
- statefulSetName
namespace_annotations:
- key: '*'
tag_name: namespace_annotations_%s
namespace_labels:
- key: '*'
tag_name: namespace_labels_%s
owner_lookup_enabled: true
- k8s.pod.name
- k8s.pod.uid
- k8s.pod.hostname
- k8s.deployment.name
- k8s.daemonset.name
- k8s.replicaset.name
- k8s.statefulset.name
- k8s.namespace.name
- k8s.node.name
- service.name
- service.namespace
passthrough: false
pod_association:
- from: build_hostname
- sources:
- from: resource_attribute
name: k8s.pod.uid
- sources:
- from: resource_attribute
name: k8s.namespace.name
- from: resource_attribute
name: k8s.pod.name
wait_for_metadata: true
wait_for_metadata_timeout: 10s
memory_limiter:
check_interval: 5s
limit_percentage: 90
Expand Down Expand Up @@ -308,7 +327,7 @@ data:
- memory_limiter
- filter/include_containers
- groupbyattrs/containers
- k8s_tagger
- k8sattributes
- resource/add_cluster
- resource/set_empty_source_metadata
- resource/containers_copy_node_to_host
Expand Down
Loading