From 66f1a8cdb5d85d2778e2979c749e93e0cea81415 Mon Sep 17 00:00:00 2001 From: Chad Patel Date: Mon, 2 Oct 2023 17:35:53 -0500 Subject: [PATCH] fix apiserver_storage_db_total_size_in_bytes (#886) --- .../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 b0f233bef0..72e0e72ccd 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml @@ -172,7 +172,7 @@ exporters: label_matchers: [ ] metric_name_selectors: - apiserver_storage_size_bytes - - apiserver_storage_size_bytes + - apiserver_storage_db_total_size_in_bytes - etcd_db_total_size_in_bytes - etcd_request_duration_seconds - dimensions: [ [ClusterName, resource], [ ClusterName ] ] diff --git a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml index 69af6a05f5..6c57b41bc5 100644 --- a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml +++ b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml @@ -143,7 +143,7 @@ exporters: label_matchers: [ ] metric_name_selectors: - apiserver_storage_size_bytes - - apiserver_storage_size_bytes + - apiserver_storage_db_total_size_in_bytes - etcd_db_total_size_in_bytes - etcd_request_duration_seconds - dimensions: [ [ ClusterName, resource ], [ ClusterName ] ] diff --git a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml index b460f21958..888495f51b 100644 --- a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml @@ -172,7 +172,7 @@ exporters: label_matchers: [ ] metric_name_selectors: - apiserver_storage_size_bytes - - apiserver_storage_size_bytes + - apiserver_storage_db_total_size_in_bytes - etcd_db_total_size_in_bytes - etcd_request_duration_seconds - dimensions: [ [ ClusterName, resource ], [ ClusterName ] ] diff --git a/translator/translate/otel/exporter/awsemf/kubernetes.go b/translator/translate/otel/exporter/awsemf/kubernetes.go index d9ae7a7674..342cd985a4 100644 --- a/translator/translate/otel/exporter/awsemf/kubernetes.go +++ b/translator/translate/otel/exporter/awsemf/kubernetes.go @@ -270,7 +270,7 @@ func getControlPlaneMetricDeclarations(conf *confmap.Conf) []*awsemfexporter.Met Dimensions: [][]string{{"ClusterName", "endpoint"}, {"ClusterName"}}, MetricNameSelectors: []string{ "apiserver_storage_size_bytes", - "apiserver_storage_size_bytes", + "apiserver_storage_db_total_size_in_bytes", "etcd_db_total_size_in_bytes", "etcd_request_duration_seconds", }, diff --git a/translator/translate/otel/exporter/awsemf/translator_test.go b/translator/translate/otel/exporter/awsemf/translator_test.go index e935dcb231..3029d4b03c 100644 --- a/translator/translate/otel/exporter/awsemf/translator_test.go +++ b/translator/translate/otel/exporter/awsemf/translator_test.go @@ -341,7 +341,7 @@ func TestTranslator(t *testing.T) { }, { Dimensions: [][]string{{"ClusterName", "endpoint"}, {"ClusterName"}}, - MetricNameSelectors: []string{"apiserver_storage_size_bytes", "apiserver_storage_size_bytes", "etcd_db_total_size_in_bytes", "etcd_request_duration_seconds"}, + MetricNameSelectors: []string{"apiserver_storage_size_bytes", "apiserver_storage_db_total_size_in_bytes", "etcd_db_total_size_in_bytes", "etcd_request_duration_seconds"}, }, { Dimensions: [][]string{{"ClusterName", "resource"}, {"ClusterName"}},