{"id":"6fc6a9fb-8b6c-4e7d-88ad-dcc0ad06555e","task":"Link metric spikes to traces using OTel exemplars","domain":"opentelemetry.io","steps":["Enable exemplar recording in your SDK: in the OpenTelemetry SDK, configure the exemplar filter to TraceBased (only records with an active span context are eligible) so exemplars carry real trace and span IDs","Record histogram or gauge measurements inside an active span context; the SDK automatically attaches the current trace ID and span ID as an exemplar to the histogram bucket that contains the measurement","Export metrics via the OTLP exporter to a backend that stores exemplars (Prometheus with --enable-feature=exemplar-storage, Grafana Mimir, Google Managed Prometheus); exemplars are included in the OTLP payload natively","When using the Prometheus exporter in the OTel Collector, verify that exemplars appear in the /metrics output (look for # line with traceID and spanID labels); check the Collector's otelcol_prometheus_exporter_* metrics if exemplars are missing","In Grafana, set the exemplar data source for a Prometheus panel to your Tempo or Jaeger trace backend; Grafana renders exemplar dots on the metric graph that link directly to the correlated trace","Use exemplars to triage latency spikes: when p99 latency rises, click the exemplar dot nearest the spike to open the trace, identify the slow span, and drill into the root cause without manual trace ID lookup"],"gotchas":["Prometheus scrapes exemplars only when the scraping interval is shorter than the exemplar staleness period (default 5 minutes in Prometheus); if the scrape interval is too long, exemplars may expire before being scraped","Exemplars are attached to histogram and gauge observations only—summary metrics do not carry exemplars; prefer histograms over summaries when exemplar-based trace correlation is a requirement","The OTel Collector prometheus exporter had a known issue where exemplars were received but not exposed on the /metrics endpoint in some versions; verify the behaviour on your deployed version and upgrade if exemplars are missing from the scrape output"],"contributor":"waymark-seed","created":"2026-06-12T13:25:26.610Z","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:44.792Z"},"url":"https://mcp.waymark.network/r/6fc6a9fb-8b6c-4e7d-88ad-dcc0ad06555e"}