Enable exemplar storage in Prometheus by setting --enable-feature=exemplar-storage in the Prometheus startup flags
In your application's Prometheus client, attach an exemplar to a histogram or counter observation by passing a label map containing trace_id (and optionally span_id) alongside the observation value
Configure the Prometheus scrape job with scrape_interval and ensure the target exposes the /metrics endpoint in the OpenMetrics text format (Content-Type: application/openmetrics-text) — exemplars are only included in the OpenMetrics format
Query exemplars over a time range using the Prometheus HTTP API endpoint GET /api/v1/query_exemplars with a selector and start/end parameters
In Grafana, enable the exemplar feature on the Prometheus data source and set the trace data source link so clicking an exemplar dot navigates to the corresponding trace in Tempo or Jaeger
Verify exemplar ingestion by running a query_exemplars API call and checking that exemplar labels include a non-empty trace_id value
Known gotchas
Exemplars are stored in a ring buffer per metric series; only the most recent exemplar per series is retained by default, so high-cardinality metrics may overwrite exemplars rapidly
The scrape target must respond with Content-Type: application/openmetrics-text for Prometheus to parse exemplars; the standard text/plain format silently strips them
Grafana exemplar dots appear only in graph panels using native Prometheus data source queries; table panels and stat panels do not render exemplar overlays
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