Label Tempo's exemplars trace_id so they link to the trace

Tempo's metrics-generator defaults the exemplar label to traceID, which
the Prometheus datasource's exemplarTraceIdDestinations (trace_id) never
matched: exemplars rendered in Grafana but didn't link to Tempo. Set
trace_id_label_name in the overrides so trace_id is the one correlation
key everywhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Movses Aslanyan
2026-10-24 22:40:58 +03:30
co-authored by Claude Opus 5.5
parent d54ea2ba41
commit 88700c000d
2 changed files with 9 additions and 0 deletions
+4
View File
@@ -45,6 +45,10 @@ OTLP/gRPC (4317) is cluster-internal only. Apps use OTLP/HTTP.
Traefik routes to that container's `:9464` behind basic auth. The scrape Traefik routes to that container's `:9464` behind basic auth. The scrape
credentials are the `prometheus-scrape-auth` secret, mounted at credentials are the `prometheus-scrape-auth` secret, mounted at
`/etc/prometheus/secrets`. `/etc/prometheus/secrets`.
- **Tempo labels exemplars `trace_id`** (`trace_id_label_name` in the
overrides). Tempo's default is `traceID`, which the Prometheus datasource's
`exemplarTraceIdDestinations` (`trace_id`) doesn't match, so span-metric
exemplars rendered in Grafana but didn't link to the trace.
The CLAUDE.md platform facts still hold: The CLAUDE.md platform facts still hold:
- OTLP metrics and logs are rejected: Alloy returns a 404 on `/v1/metrics` and - OTLP metrics and logs are rejected: Alloy returns a 404 on `/v1/metrics` and
+5
View File
@@ -45,3 +45,8 @@ overrides:
defaults: defaults:
metrics_generator: metrics_generator:
processors: [service-graphs, span-metrics, local-blocks] processors: [service-graphs, span-metrics, local-blocks]
# Not in the Ansible template. Without it the generator labels exemplars
# traceID (the code default; the docs wrongly say trace_id), which the
# Prometheus datasource's exemplarTraceIdDestinations (trace_id) never
# matches, so exemplars render but don't link to Tempo.
trace_id_label_name: trace_id