Remove resourcedetector from cluster receiver event/object#2369
Remove resourcedetector from cluster receiver event/object#2369
Conversation
…lines The logs (k8s_events), logs/objects, and logs/events pipelines in the cluster receiver were using the full resourcedetection processor, which adds host-level attributes (host.id, host.name, cloud.provider, etc.). These pipelines carry cluster-scoped data where host identity is the cluster receiver pod, not the source of the event — making those attributes misleading. Align with the metrics pipeline which correctly uses only resourcedetection/k8s_cluster_name for auto-detect distributions.
There was a problem hiding this comment.
Pull request overview
This PR aligns the cluster receiver’s cluster-scoped log pipelines (k8s events, smartagent events, and k8s objects) with the existing metrics approach by removing the full resourcedetection processor (which injects host-/node-level attributes) and using only resourcedetection/k8s_cluster_name when cluster name auto-detection is enabled.
Changes:
- Update cluster receiver log pipelines to conditionally use
resourcedetection/k8s_cluster_name(and stop using fullresourcedetection) for cluster-scoped telemetry. - Expand/adjust Helm unit tests to assert the exact processor wiring (including the “explicit clusterName disables autodetect” case) and add guard/inventory coverage for related pipelines.
- Regenerate example rendered manifests and add a changelog entry documenting the bug fix.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| unittests/resource_detection_test.yaml | Updates and expands unit tests to ensure cluster receiver log pipelines use only resourcedetection/k8s_cluster_name (or neither when clusterName is explicit). |
| helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl | Changes cluster receiver log pipeline processor lists to remove full resourcedetection and conditionally add resourcedetection/k8s_cluster_name. |
| examples/splunk-platform-with-sourcetypes/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/splunk-platform-with-sourcetypes/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/splunk-enterprise-index-routing/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/splunk-enterprise-index-routing/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/secret-validation/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/secret-validation/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/only-logs-with-extra-file-logs/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/only-logs-with-extra-file-logs/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/multiline-logs/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/multiline-logs/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/multi-metrics/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/multi-metrics/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/kubernetes-windows-nodes/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/kubernetes-windows-nodes/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/k8s-events-o11y-pipeline/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/k8s-events-o11y-pipeline/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/host-journalctl-logs/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/host-journalctl-logs/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/histograms-with-splunk-platform/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/histograms-with-splunk-platform/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/histograms-disabled/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/histograms-disabled/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/enable-persistence-queue/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/enable-persistence-queue/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/enable-operator-and-auto-instrumentation/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/enable-operator-and-auto-instrumentation/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/disable-persistence-queue-traces/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/disable-persistence-queue-traces/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/collector-cluster-receiver-only/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/collector-cluster-receiver-only/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/autodetect-istio/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/autodetect-istio/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/add-kafkametrics-receiver/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/add-kafkametrics-receiver/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| examples/add-filter-processor/rendered_manifests/deployment-cluster-receiver.yaml | Regenerated example output (config checksum updated). |
| examples/add-filter-processor/rendered_manifests/configmap-cluster-receiver.yaml | Regenerated example output reflecting removal of full resourcedetection from relevant pipelines. |
| .chloggen/fix-cluster-receiver-event-resourcedetection.yaml | Adds a changelog entry documenting the bug fix and rationale. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl
Show resolved
Hide resolved
| */}} | ||
| {{- define "splunk-otel-collector.autoDetectClusterName" -}} | ||
| {{- and (include "splunk-otel-collector.clusterNameOptional" .) (not .Values.clusterName) }} | ||
| {{- and (eq (include "splunk-otel-collector.clusterNameOptional" .) "true") (not .Values.clusterName) }} |
There was a problem hiding this comment.
Not directly related to the change but this is a no-op fix. The problem here was how Go templates evaluate truthiness. include returns a string, and in Go templates any non-empty string is truthy. So for distributions like AKS where clusterNameOptional returns "false", the old check would treat it as truthy because "false" is a non-empty string.
In practice, i think we were probably not hitting the issue since we have JSON schema enforcing clusterName for distributions where clusterNameOptional is false.
|
We need to decide on the appropriate |
*Description:
The logs (k8s_events), logs/objects, and logs/events pipelines in the cluster receiver were using the full resourcedetection processor, which adds host-level attributes (host.id, host.name, cloud.provider, etc.). These pipelines carry cluster-scoped data where host identity is the cluster receiver pod, not the source of the event.
Align with the metrics pipeline which correctly uses only
resourcedetection/k8s_cluster_namefor auto-detect distributions.