ClickHouse

OpenTelemetry Query Trace Correlation Gap

info
reliabilityUpdated Feb 6, 2026

Application-level OpenTelemetry traces are disconnected from ClickHouse server-side query logs, making it difficult to correlate slow application requests with specific ClickHouse query performance. This creates blind spots in distributed tracing.

How to detect:

Compare query counts and timing between application OTLP spans (clickhouse.query spans) and ClickHouse system.query_log. Look for discrepancies in query identification or missing query_id correlation between application and database.

Recommended action:

Instrument application code to capture query_id from ClickHouse responses and propagate to OTLP spans. Use query comment injection to add trace context to queries. Correlate application spans with system.query_log using query_id or normalized query hash. Export ClickHouse query_log to observability backend for unified analysis.