From ca42f902c19af37ec01af87e2e90fd2339374c31 Mon Sep 17 00:00:00 2001 From: Ankur Singh <49074231+sankur-codes@users.noreply.github.com> Date: Tue, 18 Feb 2025 18:50:11 +0530 Subject: [PATCH] Adding attributes to metrics --- pkg/deploy/generator/scripts/util-services.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/deploy/generator/scripts/util-services.sh b/pkg/deploy/generator/scripts/util-services.sh index 420005dd353..95a4cd64299 100644 --- a/pkg/deploy/generator/scripts/util-services.sh +++ b/pkg/deploy/generator/scripts/util-services.sh @@ -485,6 +485,14 @@ IPADDRESS='$ipaddress'" collection_interval: 20s processors: batch: + attributes/insert: + actions: + - key: \"location\" + action: insert + value: \"$LOCATION\" + - key: \"host\" + action: insert + value: \"$(hostname)\" extensions: health_check: endpoint: $ipaddress:13133 @@ -498,7 +506,7 @@ service: pipelines: metrics: receivers: [httpcheck] - processors: [batch] + processors: [batch, attributes/insert] exporters: [otlp]" write_file aro_otel_collector_appconfig_filename aro_otel_collector_appconfig_file true