diff --git a/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml b/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml index 3db723ab..54a78ad7 100644 --- a/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml +++ b/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml @@ -79,8 +79,20 @@ spec: log_statements: - context: log statements: - - set(resource.attributes["application"], "central-storage") + # Set Grafana queryable labels + - set(resource.attributes["service_name"], "central-storage") - set(resource.attributes["environment"], "{{ .Values.global.environment | default .Release.Namespace }}") + - set(resource.attributes["pod_name"], resource.attributes["k8s.pod.name"]) + - set(resource.attributes["pod_ip"], resource.attributes["k8s.pod.ip"]) + # Keep application for backward compatibility + - set(resource.attributes["application"], "central-storage") + # Set additional kubernetes labels + - 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"]) + # Parse and enrich log body - set(resource.attributes["body_json"], ParseJSON(log.body)) - set(resource.attributes["body_json"]["kubernetes"]["pod"], resource.attributes["k8s.pod.name"]) - set(resource.attributes["body_json"]["kubernetes"]["namespace"], resource.attributes["k8s.namespace.name"])