diff --git a/charts/k8s-monitoring/charts/feature-pod-logs/templates/_filelog.alloy.tpl b/charts/k8s-monitoring/charts/feature-pod-logs/templates/_filelog.alloy.tpl index e69fee09f8..720c69c2f3 100644 --- a/charts/k8s-monitoring/charts/feature-pod-logs/templates/_filelog.alloy.tpl +++ b/charts/k8s-monitoring/charts/feature-pod-logs/templates/_filelog.alloy.tpl @@ -122,6 +122,10 @@ otelcol.processor.transform "pod_logs" { `delete_key(attributes, "k8s.container.restart_count")`, `delete_key(attributes, "log.file.path")`, + `set(attributes["service.name"], attributes["resource.opentelemetry.io/service.name"]) where attributes["service.name"] == nil`, + `set(attributes["service.namespace"], attributes["resource.opentelemetry.io/service.namespace"]) where attributes["service.namespace"] == nil`, + `set(attributes["deployment.environment.name"], attributes["resource.opentelemetry.io/deployment.environment.name"]) where attributes["deployment.environment.name"] == nil`, + `set(attributes["service.name"], attributes["app.kubernetes.io/name"]) where attributes["service.name"] == nil`, `set(attributes["service.name"], attributes["k8s.deployment.name"]) where attributes["service.name"] == nil`, `set(attributes["service.name"], attributes["k8s.replicaset.name"]) where attributes["service.name"] == nil`,