From fa0c4152a211dde21d8952bb0ba3dc00bf0d519f Mon Sep 17 00:00:00 2001 From: Kristof Gyuracz Date: Thu, 6 Jun 2024 16:13:06 +0200 Subject: [PATCH] fix metric attributes --- config/manager/kustomization.yaml | 2 +- internal/controller/telemetry/otel_conf_gen.go | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index a78e80d..7a8219f 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: controller newName: ghcr.io/kube-logging/telemetry-controller - newTag: 0.0.6 + newTag: 0.0.7-dev.2 diff --git a/internal/controller/telemetry/otel_conf_gen.go b/internal/controller/telemetry/otel_conf_gen.go index 26f376d..3bab884 100644 --- a/internal/controller/telemetry/otel_conf_gen.go +++ b/internal/controller/telemetry/otel_conf_gen.go @@ -465,6 +465,9 @@ func generateCountConnectors() map[string]any { { Key: "k8s.pod.labels.app.kubernetes.io/name", }, + { + Key: "k8s.pod.labels.app", + }, }, }, }, @@ -498,6 +501,9 @@ func generateCountConnectors() map[string]any { { Key: "k8s.pod.labels.app.kubernetes.io/name", }, + { + Key: "k8s.pod.labels.app", + }, }, }, }, @@ -555,11 +561,6 @@ func generateMetricsProcessors() map[string]any { metricsProcessors["attributes/metricattributes"] = AttributesProcessor{ Actions: []AttributesProcessorAction{ - { - Action: "insert", - Key: "app", - FromAttribute: "k8s.pod.labels.app.kubernetes.io/name", - }, { Action: "insert", Key: "host",