From 5a17511d028938e09865a411c5acb272a6875399 Mon Sep 17 00:00:00 2001 From: Adam Boguszewski Date: Tue, 26 Sep 2023 09:30:16 +0200 Subject: [PATCH] feat!(metrics): move extra processors after sumologic_schema --- .changelog/3306.changed.txt | 1 + deploy/helm/sumologic/conf/metrics/otelcol/pipeline.yaml | 2 +- docs/v4-migration-doc.md | 6 ++++++ tests/helm/metrics_test.go | 2 +- .../metadata_metrics_otc/additional_endpoints.output.yaml | 2 +- .../goldenfile/metadata_metrics_otc/basic.output.yaml | 2 +- .../goldenfile/metadata_metrics_otc/custom.output.yaml | 2 +- .../metadata_metrics_otc/filtered_app_metrics.output.yaml | 2 +- 8 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .changelog/3306.changed.txt diff --git a/.changelog/3306.changed.txt b/.changelog/3306.changed.txt new file mode 100644 index 0000000000..36af0a75ca --- /dev/null +++ b/.changelog/3306.changed.txt @@ -0,0 +1 @@ +feat!(metrics): move extra processors after sumologic_schema \ No newline at end of file diff --git a/deploy/helm/sumologic/conf/metrics/otelcol/pipeline.yaml b/deploy/helm/sumologic/conf/metrics/otelcol/pipeline.yaml index 1df20b2ebe..efb647b0be 100644 --- a/deploy/helm/sumologic/conf/metrics/otelcol/pipeline.yaml +++ b/deploy/helm/sumologic/conf/metrics/otelcol/pipeline.yaml @@ -16,6 +16,7 @@ processors: - resource - k8s_tagger - source + - sumologic_schema {{- if .Values.sumologic.metrics.otelcol.extraProcessors }} {{- range $processor := .Values.sumologic.metrics.otelcol.extraProcessors }} {{ printf "- %s" ( $processor | keys | first ) | indent 2 }} @@ -23,7 +24,6 @@ processors: {{- end }} - resource/remove_k8s_pod_pod_name - resource/delete_source_metadata - - sumologic_schema - transform/set_name - groupbyattrs/group_by_name - transform/remove_name diff --git a/docs/v4-migration-doc.md b/docs/v4-migration-doc.md index 3c5e6dd307..66c7f788bb 100644 --- a/docs/v4-migration-doc.md +++ b/docs/v4-migration-doc.md @@ -256,8 +256,14 @@ require additional action. Some Kubernetes objects, for example statefulsets, have a tight (63 characters) limit for their names. Because of that, we truncate the prefix that is attached to the names. In particular, the value under key `fullnameOverride` will be truncated to 22 characters. +- Moving extra processors in metrics pipeline after sumologic_schema processor + + This has been changed in order to make this coherent with pipeline for logs. + Now, the extra processors should use [translated versions of some attributes][attribute_translation]. + [application_metrics_annotation]: ./collecting-application-metrics.md#application-metrics-are-exposed-one-endpoint-scenario [kubernetes_metrics_v3]: https://github.com/SumoLogic/sumologic-kubernetes-collection/blob/release-v3/docs/collecting-kubernetes-metrics.md#collecting-kubernetes-metrics [otel_metrics_filter]: ./collecting-application-metrics.md#filtering-metrics [v3_migration_guide]: ./v3-migration-doc.md +[attribute_translation]: https://github.com/SumoLogic/sumologic-otel-collector/tree/v0.85.0-sumo-0/pkg/processor/sumologicschemaprocessor#attribute-translation diff --git a/tests/helm/metrics_test.go b/tests/helm/metrics_test.go index 2f6d6f8c86..54ff9b7115 100644 --- a/tests/helm/metrics_test.go +++ b/tests/helm/metrics_test.go @@ -126,12 +126,12 @@ func TestMetadataMetricsOtelConfigExtraProcessors(t *testing.T) { "resource", "k8s_tagger", "source", + "sumologic_schema", "filter/1", "transform/rename_metric", "transform/rename_metadata", "resource/remove_k8s_pod_pod_name", "resource/delete_source_metadata", - "sumologic_schema", "transform/set_name", "groupbyattrs/group_by_name", "transform/remove_name", diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml index 5e3055ddc6..fe36d7f868 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml @@ -187,9 +187,9 @@ data: - resource - k8s_tagger - source + - sumologic_schema - resource/remove_k8s_pod_pod_name - resource/delete_source_metadata - - sumologic_schema - transform/set_name - groupbyattrs/group_by_name - transform/remove_name diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml index 85df3500e1..2b4e09ca89 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml @@ -185,9 +185,9 @@ data: - resource - k8s_tagger - source + - sumologic_schema - resource/remove_k8s_pod_pod_name - resource/delete_source_metadata - - sumologic_schema - transform/set_name - groupbyattrs/group_by_name - transform/remove_name diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml index ef38dc4eb4..619e15d34f 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml @@ -291,9 +291,9 @@ data: - resource - k8s_tagger - source + - sumologic_schema - resource/remove_k8s_pod_pod_name - resource/delete_source_metadata - - sumologic_schema - transform/set_name - groupbyattrs/group_by_name - transform/remove_name diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml index 9223239438..e55d5a4f1e 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml @@ -209,9 +209,9 @@ data: - resource - k8s_tagger - source + - sumologic_schema - resource/remove_k8s_pod_pod_name - resource/delete_source_metadata - - sumologic_schema - transform/set_name - groupbyattrs/group_by_name - transform/remove_name