Skip to content

OpenTelemetry tracing#695

Draft
ringerc wants to merge 2 commits into
thanos-io:mainfrom
ringerc:001-otel-tracing
Draft

OpenTelemetry tracing#695
ringerc wants to merge 2 commits into
thanos-io:mainfrom
ringerc:001-otel-tracing

Conversation

@ringerc

@ringerc ringerc commented Mar 20, 2026

Copy link
Copy Markdown

This is an early LLM-assisted draft for adding OpenTelemetry tracing to the Thanos PromQL engine

Add support for OpenTelemetry tracing to the Thanos PromQL engine.

If a trace context is inherited in the go context passed to a query
execution, trace spans will be emitted for:

* The top level query
* Storage access
* Outbound calls for distributed query

Trace spans include key attributes like:

* Request queries or selectors
* Response series and sample counts

If the EnableAnalysis query option is set on the query, operation-level
tracing will be performed on the query's execution.

Per-operation tracing may also be enabled by setings the trace baggage
field "promql.enable_analysis" to "true". Baggage-based control is used
so that analysis can be controlled by a higher level in the query
execution chain without having to propagate specific query options.

Signed-off-by: Craig Ringer <craig.ringer@enterprisedb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant