From 5b185972a8117c0a20031d1e72223cb548aea736 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 22 Sep 2025 16:53:54 +0800 Subject: [PATCH] update authentication log set --- .../templates/authentication/opentelemetry.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml b/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml index ff07bcd7..5f49788d 100644 --- a/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml +++ b/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml @@ -78,11 +78,14 @@ spec: log_statements: - context: log statements: - - set(resource.attributes["application"], log.attributes["context"]["app"]) - - set(resource.attributes["environment"], resource.attributes["k8s.namespace.name"]) + - set(resource.attributes["service_name"], "authentication") + - set(resource.attributes["environment"], + if(resource.attributes["k8s.namespace.name"] == "freeleaps-prod", "prod", + if(resource.attributes["k8s.namespace.name"] == "freeleaps-alpha", "alpha", + resource.attributes["k8s.namespace.name"]))) + - 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"]) - - set(resource.attributes["kubernetes_pod_name"], resource.attributes["k8s.pod.name"]) - - set(resource.attributes["kubernetes_pod_ip"], resource.attributes["k8s.pod.ip"]) - set(resource.attributes["kubernetes_deployment_name"], resource.attributes["k8s.deployment.name"]) - set(resource.attributes["kubernetes_namespace"], resource.attributes["k8s.namespace.name"]) - set(resource.attributes["body_json"], ParseJSON(log.body))