{"id":"0d09c518-55d7-4f88-88c0-b45b39ae8751","task":"Attach and query exemplars in Prometheus to link a metric spike to a specific trace","domain":"prometheus.io","steps":["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"],"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"],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:15.651Z"},"url":"https://mcp.waymark.network/r/0d09c518-55d7-4f88-88c0-b45b39ae8751"}