fix: set service.instance.id for unique instance label #144

Merged
argoyle merged 1 commits from fix/otel-service-instance-id into main 2026-05-29 06:39:16 +00:00

1 Commits

Author SHA1 Message Date
argoyle 717ac59faf fix: set service.instance.id so metrics carry a unique instance label
otelsetup / vulnerabilities (pull_request) Successful in 1m58s
otelsetup / test (pull_request) Successful in 2m35s
pre-commit / pre-commit (pull_request) Successful in 6m20s
SetupOTelSDK now adds service.instance.id (the pod hostname) to
OTEL_RESOURCE_ATTRIBUTES. The OTLP->Prometheus exporter maps it to the
`instance` label on both metrics and target_info, which (1) stops
multi-replica services from colliding on a single series and (2) gives
PromQL joins a unique (job, instance) key. Falls back to the service name
when the hostname is unavailable.
2026-05-29 08:28:19 +02:00