From c08ddf7f76424445139e30e004c82ba5273dad9c Mon Sep 17 00:00:00 2001 From: zhenyus Date: Mon, 21 Apr 2025 17:20:39 +0800 Subject: [PATCH] fix(opentelemetry): add resource attributes for application and environment in log transformation Signed-off-by: zhenyus --- .../templates/authentication/opentelemetry.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml b/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml index d6969dc8..6741b468 100644 --- a/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml +++ b/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml @@ -43,6 +43,14 @@ spec: # - k8s.deployment.uid # - k8s.namespace.name # - k8s.node.name + # resource: + # attributes: + # - action: upsert + # key: application + # from_attribute: context.app + # - action: upsert + # key: environment + # from_attribute: context.env transform: log_statements: - context: log @@ -50,7 +58,6 @@ spec: - set(log.body["kubernetes"], log.attributes["kubernetes"]) - set(resource.attributes["application"], log.attributes["context"]["app"]) - set(resource.attributes["environment"], log.attributes["context"]["env"]) - - context batch: send_batch_size: 5 timeout: 10s