Enable exemplar sampling in the OTel Metrics SDK by setting the exemplar filter to TRACE_BASED so exemplars are only attached when a sampled span is active
Confirm the histogram or gauge instruments are recording at the same time as an active span so the SDK can capture the trace_id and span_id
Export metrics with exemplars via OTLP to a backend that stores them (Prometheus native exemplars, Grafana Mimir)
In the log appender configuration enable trace_id and span_id field injection so every log line carries correlation identifiers
In the observability UI (Grafana) configure the datasource trace URL template so clicking an exemplar dot opens the matching trace in Tempo
Known gotchas
Prometheus only stores one exemplar per scrape interval per time series; high-frequency updates replace exemplars before they can be queried
Exemplars are only attached to sampled spans; if the sample rate is low, most histogram observations have no exemplar
Log correlation requires trace context to be in scope at the time the log is emitted; deferred log writes (async loggers) may lose the active context
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