From 02aa7bfc88c5aab04e3bc37197b4528621709892 Mon Sep 17 00:00:00 2001 From: Oleksandr Turytsia Date: Mon, 6 Jan 2025 15:17:13 +0100 Subject: [PATCH] feat: temporary labels are now removed for matrics --- deploy/helm/metrics-collector-config.yaml | 3 +++ .../metrics-collector-config-map-fargate_test.yaml.snap | 3 +++ .../metrics-collector-config-map_test.yaml.snap | 9 +++++++++ 3 files changed, 15 insertions(+) diff --git a/deploy/helm/metrics-collector-config.yaml b/deploy/helm/metrics-collector-config.yaml index 013e873d..a6f383f9 100644 --- a/deploy/helm/metrics-collector-config.yaml +++ b/deploy/helm/metrics-collector-config.yaml @@ -751,6 +751,9 @@ processors: - delete_key(resource.attributes, "sw.k8s.persistentvolume.found") - delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found") - delete_key(resource.attributes, "sw.k8s.service.found") + - delete_key(resource.attributes, "sw.k8s.job.found") + - delete_key(resource.attributes, "sw.k8s.cronjob.found") + - delete_key(resource.attributes, "sw.k8s.node.found") attributes/remove_prometheus_attributes_endpoint: exclude: diff --git a/deploy/helm/tests/__snapshot__/metrics-collector-config-map-fargate_test.yaml.snap b/deploy/helm/tests/__snapshot__/metrics-collector-config-map-fargate_test.yaml.snap index c186444a..3c3ec205 100644 --- a/deploy/helm/tests/__snapshot__/metrics-collector-config-map-fargate_test.yaml.snap +++ b/deploy/helm/tests/__snapshot__/metrics-collector-config-map-fargate_test.yaml.snap @@ -1592,6 +1592,9 @@ Metrics config should match snapshot when using default values: - delete_key(resource.attributes, "sw.k8s.persistentvolume.found") - delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found") - delete_key(resource.attributes, "sw.k8s.service.found") + - delete_key(resource.attributes, "sw.k8s.job.found") + - delete_key(resource.attributes, "sw.k8s.cronjob.found") + - delete_key(resource.attributes, "sw.k8s.node.found") transform/scope: metric_statements: - context: scope diff --git a/deploy/helm/tests/__snapshot__/metrics-collector-config-map_test.yaml.snap b/deploy/helm/tests/__snapshot__/metrics-collector-config-map_test.yaml.snap index 1d4b3096..629bf3e6 100644 --- a/deploy/helm/tests/__snapshot__/metrics-collector-config-map_test.yaml.snap +++ b/deploy/helm/tests/__snapshot__/metrics-collector-config-map_test.yaml.snap @@ -1592,6 +1592,9 @@ Metrics config should match snapshot when fargate is enabled: - delete_key(resource.attributes, "sw.k8s.persistentvolume.found") - delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found") - delete_key(resource.attributes, "sw.k8s.service.found") + - delete_key(resource.attributes, "sw.k8s.job.found") + - delete_key(resource.attributes, "sw.k8s.cronjob.found") + - delete_key(resource.attributes, "sw.k8s.node.found") transform/scope: metric_statements: - context: scope @@ -3451,6 +3454,9 @@ Metrics config should match snapshot when using Prometheus url with extra_scrape - delete_key(resource.attributes, "sw.k8s.persistentvolume.found") - delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found") - delete_key(resource.attributes, "sw.k8s.service.found") + - delete_key(resource.attributes, "sw.k8s.job.found") + - delete_key(resource.attributes, "sw.k8s.cronjob.found") + - delete_key(resource.attributes, "sw.k8s.node.found") transform/scope: metric_statements: - context: scope @@ -5252,6 +5258,9 @@ Metrics config should match snapshot when using default values: - delete_key(resource.attributes, "sw.k8s.persistentvolume.found") - delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found") - delete_key(resource.attributes, "sw.k8s.service.found") + - delete_key(resource.attributes, "sw.k8s.job.found") + - delete_key(resource.attributes, "sw.k8s.cronjob.found") + - delete_key(resource.attributes, "sw.k8s.node.found") transform/scope: metric_statements: - context: scope