From c6f3e33fc965c1e589cc32552be64a334fcbaed8 Mon Sep 17 00:00:00 2001 From: Mitali Salvi <44349099+mitali-salvi@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:43:39 -0400 Subject: [PATCH] Removing service dimension for pod-net metrics (#916) --- .../tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml | 2 +- .../tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml | 2 +- .../tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml | 2 +- translator/translate/otel/exporter/awsemf/kubernetes.go | 2 +- translator/translate/otel/exporter/awsemf/translator_test.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml index 2da8fa2114..a1746ec979 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml @@ -70,7 +70,7 @@ exporters: - pod_network_tx_bytes - pod_cpu_utilization_over_pod_limit - pod_memory_utilization_over_pod_limit - - dimensions: [ [ ClusterName, FullPodName, Namespace, PodName ], [ ClusterName, Namespace, PodName ], [ ClusterName, Namespace, Service ], [ ClusterName ] ] + - dimensions: [ [ ClusterName, FullPodName, Namespace, PodName ], [ ClusterName, Namespace, PodName ], [ ClusterName, Namespace ], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: - pod_interface_network_rx_dropped diff --git a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml index 0c98ba23de..64ed8e36cb 100644 --- a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml +++ b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml @@ -41,7 +41,7 @@ exporters: - pod_network_tx_bytes - pod_cpu_utilization_over_pod_limit - pod_memory_utilization_over_pod_limit - - dimensions: [ [ ClusterName, FullPodName, Namespace, PodName ], [ ClusterName, Namespace, PodName ], [ ClusterName, Namespace, Service ], [ ClusterName ] ] + - dimensions: [ [ ClusterName, FullPodName, Namespace, PodName ], [ ClusterName, Namespace, PodName ], [ ClusterName, Namespace ], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: - pod_interface_network_rx_dropped diff --git a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml index b9d17ebb84..3eb5ce2d7e 100644 --- a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml @@ -70,7 +70,7 @@ exporters: - pod_network_tx_bytes - pod_cpu_utilization_over_pod_limit - pod_memory_utilization_over_pod_limit - - dimensions: [ [ ClusterName, FullPodName, Namespace, PodName ], [ ClusterName, Namespace, PodName ], [ ClusterName, Namespace, Service ], [ ClusterName ] ] + - dimensions: [ [ ClusterName, FullPodName, Namespace, PodName ], [ ClusterName, Namespace, PodName ], [ ClusterName, Namespace ], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: - pod_interface_network_rx_dropped diff --git a/translator/translate/otel/exporter/awsemf/kubernetes.go b/translator/translate/otel/exporter/awsemf/kubernetes.go index 76d2f39ea5..564b0c2c84 100644 --- a/translator/translate/otel/exporter/awsemf/kubernetes.go +++ b/translator/translate/otel/exporter/awsemf/kubernetes.go @@ -111,7 +111,7 @@ func getPodMetricDeclarations(conf *confmap.Conf) []*awsemfexporter.MetricDeclar Dimensions: [][]string{ {"FullPodName", "PodName", "Namespace", "ClusterName"}, {"PodName", "Namespace", "ClusterName"}, - {"Service", "Namespace", "ClusterName"}, + {"Namespace", "ClusterName"}, {"ClusterName"}, }, MetricNameSelectors: []string{"pod_interface_network_rx_dropped", "pod_interface_network_tx_dropped"}, diff --git a/translator/translate/otel/exporter/awsemf/translator_test.go b/translator/translate/otel/exporter/awsemf/translator_test.go index 8af6695ee7..fb76195e0c 100644 --- a/translator/translate/otel/exporter/awsemf/translator_test.go +++ b/translator/translate/otel/exporter/awsemf/translator_test.go @@ -282,7 +282,7 @@ func TestTranslator(t *testing.T) { Dimensions: [][]string{ {"FullPodName", "PodName", "Namespace", "ClusterName"}, {"PodName", "Namespace", "ClusterName"}, - {"Service", "Namespace", "ClusterName"}, + {"Namespace", "ClusterName"}, {"ClusterName"}, }, MetricNameSelectors: []string{"pod_interface_network_rx_dropped", "pod_interface_network_tx_dropped"},