From d60937871f9b43b177cf90d4fd8c148a6d49b316 Mon Sep 17 00:00:00 2001 From: Dmitry Anoshin Date: Tue, 2 May 2023 13:56:41 -0700 Subject: [PATCH 1/2] Remove excessive istio attributes to avoid hitting the dimensions limit Add a new processor attributes/istio to drop excessive istio attributes and avoid running into the dimensions limit if scraping istio metrics is enabled. --- CHANGELOG.md | 1 + .../templates/config/_otel-agent.tpl | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80a542ed7f..dcfb938879 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). skipped when we use both `multilineConfig` AND `extraOperators` in values.yaml - Enable retry mechanism in filelog receiver to avoid dropping logs on backpressure from the downstream pipeline components [#764](https://github.com/signalfx/splunk-otel-collector-chart/pull/764) +- Drop excessive istio attributes to avoid running into the dimensions limit when scraping istio metrics is enabled [765](https://github.com/signalfx/splunk-otel-collector-chart/pull/765) ## [0.75.0] - 2023-04-17 diff --git a/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl b/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl index 7e42949d3b..7661644593 100644 --- a/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl +++ b/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl @@ -586,6 +586,30 @@ processors: new_name: container.memory.usage {{- end }} + {{- if or .Values.autodetect.prometheus .Values.autodetect.istio }} + # This processor is used to remove excessive istio attributes to avoid running into the dimensions limit. + # This configuration assumes single cluster istio deployment. If you run istio in multi-cluster scenarios, + # you may need to adjust this configuration. + attributes/istio: + include: + match_type: regexp + metric_names: + - istio_.* + actions: + - action: delete + key: source_cluster + - action: delete + key: destination_cluster + - action: delete + key: source_canonical_service + - action: delete + key: destination_canonical_service + - action: delete + key: source_canonical_revision + - action: delete + key: destination_canonical_revision + {{- end }} + # By default only SAPM exporter enabled. It will be pointed to collector deployment if enabled, # Otherwise it's pointed directly to signalfx backend based on the values provided in signalfx setting. # These values should not be specified manually and will be set in the templates. @@ -774,6 +798,9 @@ service: processors: - memory_limiter - batch + {{- if or .Values.autodetect.prometheus .Values.autodetect.istio }} + - attributes/istio + {{- end }} - resourcedetection - resource {{- if (and .Values.splunkPlatform.metricsEnabled .Values.environment) }} From 3728c1d0ae97b9e71ee1b182652678afb25a8679 Mon Sep 17 00:00:00 2001 From: Dmitrii Anoshin Date: Wed, 3 May 2023 15:13:15 -0700 Subject: [PATCH 2/2] Update helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl Co-authored-by: Jina Jain --- .../splunk-otel-collector/templates/config/_otel-agent.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl b/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl index 7661644593..5fa27e15ba 100644 --- a/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl +++ b/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl @@ -588,7 +588,7 @@ processors: {{- if or .Values.autodetect.prometheus .Values.autodetect.istio }} # This processor is used to remove excessive istio attributes to avoid running into the dimensions limit. - # This configuration assumes single cluster istio deployment. If you run istio in multi-cluster scenarios, + # This configuration assumes single cluster istio deployment. If you run istio in multi-cluster scenarios or make use of the canonical service and revision labels, # you may need to adjust this configuration. attributes/istio: include: