fix: add service.name attribute to prevent unknown_service classification

- Add service.name resource attribute in addition to service_name
- This should prevent logs from being classified as unknown_service in Loki
- Keep both attributes for compatibility
This commit is contained in:
Nicolas 2025-09-22 20:40:30 +08:00
parent b1554522b5
commit c4719493af

View File

@ -77,6 +77,7 @@ spec:
log_statements:
- context: log
statements:
- set(resource.attributes["service.name"], "authentication")
- set(resource.attributes["service_name"], "authentication")
- set(resource.attributes["environment"], "alpha")
- set(resource.attributes["environment"], "prod") where resource.attributes["k8s.namespace.name"] == "freeleaps-prod"