Add the spanmetrics connector to the connectors section of the Collector config; specify dimensions to extract as metric labels (e.g., http.method, http.status_code, service.name)
Wire the connector so it receives trace data from a traces pipeline output and emits metrics to a metrics pipeline input; in the pipelines section the traces pipeline lists spanmetrics in its exporters and the metrics pipeline lists spanmetrics in its receivers
Configure the histogram block to choose between explicit bucket boundaries (latency buckets in milliseconds) or exponential histograms for higher-fidelity quantile estimation
Set the metrics_flush_interval to control how often accumulated span metrics are emitted downstream; align this with your scrape interval if exporting to Prometheus
Add a Prometheus exporter or remote_write exporter in the metrics pipeline to forward the generated calls_total and duration histogram metrics to your metrics backend
Validate the output by querying for otelcol_spanmetrics_calls_total or your configured namespace prefix in Prometheus or your metrics backend
Known gotchas
The spanmetrics connector generates a metric series for every unique combination of dimension label values; high-cardinality span attributes (like user IDs) will cause a metric cardinality explosion — be selective about which dimensions you include
Span metrics derived from sampled traces undercount actual request rates; if your trace sampling rate is less than 100%, the metric values will be proportionally lower than reality unless you apply a sampling correction factor
The connector was previously named the spanmetrics processor and later the spanmetrics connector; config syntax changed when it moved from processor to connector — ensure you are using the connector-style configuration for Collector versions 0.70+
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