From b1f6ce8a1d959c942adfa6c73441dfe545e986ed Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 22 Sep 2025 17:47:40 +0800 Subject: [PATCH] Set the log environment for authentication using string replacement --- .../authentication/templates/authentication/opentelemetry.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml b/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml index 38cf1ac3..93a370e7 100644 --- a/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml +++ b/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml @@ -79,7 +79,8 @@ spec: - context: log statements: - set(resource.attributes["service_name"], "authentication") - - set(resource.attributes["environment"], resource.attributes["k8s.namespace.name"]) + - set(resource.attributes["environment"], + replace_all(resource.attributes["k8s.namespace.name"], "freeleaps-", "")) - set(resource.attributes["pod_ip"], resource.attributes["k8s.pod.ip"]) - set(resource.attributes["pod_name"], resource.attributes["k8s.pod.name"]) - set(resource.attributes["kubernetes_node_name"], resource.attributes["k8s.node.name"])