From 2e6c6b6d5052dd69166a05a5ed0fac9c07a40308 Mon Sep 17 00:00:00 2001 From: Dani Louca Date: Mon, 1 Nov 2021 18:06:38 -0400 Subject: [PATCH] add kubernetes_cluster attribute to sfx events Signed-off-by: Dani Louca --- .../config/_otel-k8s-cluster-receiver-config.tpl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl b/helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl index d7025e4d1..722a35b6b 100644 --- a/helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl +++ b/helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl @@ -48,6 +48,14 @@ processors: {{- include "splunk-otel-collector.resourceDetectionProcessor" . | nindent 2 }} + {{- if and .Values.otelK8sClusterReceiver.k8sEventsEnabled (eq (include "splunk-otel-collector.o11yMetricsEnabled" .) "true") }} + resource/add_event_k8s: + attributes: + - action: insert + key: kubernetes_cluster + value: {{ .Values.clusterName }} + {{- end }} + # Resource attributes specific to the collector itself. resource/add_collector_k8s: attributes: @@ -155,6 +163,7 @@ service: - memory_limiter - batch - resource + - resource/add_event_k8s exporters: - signalfx {{- if (eq (include "splunk-otel-collector.o11yLogsEnabled" .) "true") }}