Enable exemplar storage in the application's Prometheus client library: in the Go client, use prometheus.NewHistogramVec with ExemplarObserve; in the Python client, use labels parameter on histogram observe; record the trace_id and span_id as exemplar labels
Enable Prometheus exemplar storage by adding --enable-feature=exemplar-storage to the Prometheus server startup flags; without this flag Prometheus discards exemplars
Confirm exemplars are being stored by querying the Prometheus HTTP API at /api/v1/query_exemplars with the metric name and a time range
In Grafana, open the Prometheus data source settings and enable the Exemplars toggle; configure the trace data source (Tempo or Jaeger) and the URL template that maps trace IDs to trace views
In Grafana Explore or a dashboard panel using Prometheus, hover over a data point spike; if exemplars are present a diamond marker appears — click it to open the linked trace in Tempo or Jaeger
Ensure the application instrumentation uses the same trace ID format and propagates it into exemplar labels consistently; mismatches between exemplar trace IDs and the trace backend format break the jump-to-trace link
Known gotchas
Exemplars are only supported for histogram and summary metric types in Prometheus; counters and gauges do not support exemplars in the current Prometheus data model
Prometheus exemplar storage has a per-series exemplar limit (default 100 per series in recent versions); once the ring buffer fills, old exemplars are overwritten — high-traffic endpoints may lose exemplar coverage during spikes
Remote write to Grafana Mimir or Thanos preserves exemplars only if the receiver is configured to accept them; verify the remote write receiver has exemplar ingestion enabled before relying on exemplars in long-term storage
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp