diff --git a/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml b/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml index a3746bb6..cc6db0a0 100644 --- a/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml +++ b/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml @@ -78,6 +78,17 @@ spec: - action: insert key: k8s.deployment.name value: ${KUBE_META_OBJECT_NAME} + transform: + log_statements: + - context: log + statements: + - set(resource.attributes["application"], log.attributes["context"]["app"]) + - set(resource.attributes["environment"], log.attributes["context"]["env"]) + - 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"]) batch: send_batch_size: 5 timeout: 10s @@ -93,6 +104,6 @@ spec: pipelines: logs: receivers: [filelog] - processors: [resource, batch] + processors: [resource, transform, batch] exporters: [otlphttp/logs] {{- end }} \ No newline at end of file