OBSERVABILITY Signal 495
Converting OpenTelemetry database spans into span-derived metrics identifies traffic-weighted slow SQL queries
A CNCF guide outlines a workflow for extracting span-derived metrics from OpenTelemetry traces to detect, prioritize, and alert on slow SQL queries with full application context.
Traditional database tools identify slow queries but lack the application context needed to prioritize them during incidents or optimization efforts. Deriving metrics directly from OpenTelemetry traces links query latency to the specific service and endpoint that triggered it, automating a triage process that is typically manual.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
OpenTelemetry traces provide application context like service and endpoint to slow database queries, which native database tools lack.
Span-derived metrics can be used for traffic-weighted query optimization and real-time anomaly detection during incidents.
Slow queries can stem from multiple causes, including resource contention, plan regressions, and pathological patterns like N+1 problems, not just missing indexes.
THE CLUSTER
↗