Skip to content

Comments

chore(tracing): support for open telemetry traces#4855

Draft
aleks-p wants to merge 9 commits intomainfrom
chore/switch-to-otel-tracing
Draft

chore(tracing): support for open telemetry traces#4855
aleks-p wants to merge 9 commits intomainfrom
chore/switch-to-otel-tracing

Conversation

@aleks-p
Copy link
Contributor

@aleks-p aleks-p commented Feb 20, 2026

See #4127 and #4178. This is work in progress.

Adds a tool that verifies traces are emitted. Doesn't yet verify that traces have the correct structure, but it allows for manual verification.

TODO:

  • add a flag to enable otel traces

aleks-p and others added 9 commits February 20, 2026 17:51
Add tools/tracing/ with a self-contained setup that builds Pyroscope
from source, starts it alongside Tempo (via docker-compose), sends
real requests via profilecli, and asserts that write-path and read-path
traces appear in Tempo using TraceQL queries with retry logic.

Includes a Grafana instance for manual trace inspection (--interactive).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace opentracing.StartSpanFromContext with dskit tracing.StartSpanFromContext
in the write path and utility packages. dskit's tracing bridge creates spans
compatible with whichever tracer is registered (OpenTracing or OTel).

Packages: distributor, ingester, segmentwriter, spanlogger/query_log,
delayhandler, metastore/tracing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace opentracing.StartSpanFromContext with dskit tracing.StartSpanFromContext
in the read path packages.

Packages: querier, queryfrontend, querybackend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace opentracing.StartSpanFromContext with dskit tracing.StartSpanFromContext
in the storage engine and compaction packages.

Packages: phlaredb, phlaredb/block, phlaredb/query, phlaredb/symdb,
compactor, compactionworker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace opentracing.StartSpanFromContext with dskit tracing.StartSpanFromContext
in the metastore and VCS packages.

Packages: metastore, metastore/fsm, metastore/raftnode, frontend/vcs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace OpenTracing-specific integration code with OTel equivalents:

- spanlogger: switch to spanlogger.NewOTel()
- httpgrpcutil/carrier: add OTel propagation.TextMapCarrier interface
- frontend: replace tracer.Inject with otel.GetTextMapPropagator().Inject
- scheduler: replace OpenTracing extraction with OTel propagation
- querier/worker: replace OpenTracing extraction with OTel propagation
- gRPC clients: replace otgrpc interceptors with otelgrpc.NewClientHandler
- HTTP transport: replace nethttp.TraceRequest with otelhttp.NewTransport
- objstore: switch from opentracing to opentelemetry tracing wrapper
- Delete pkg/util/nethttp/client.go (no longer needed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the OpenTracing tracer initialization with an OTel TracerProvider:
- Use dskit's NewOTelOrJaegerFromEnv (understands existing JAEGER_* env vars)
- Fall back to direct OTel SDK init if dskit hits schema URL conflicts
- Move opentracing-go, opentracing-contrib/go-grpc, jaeger-client-go
  from direct to indirect dependencies
- Remove OpenTracing tracer registration from modules.go

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update stale references to opentracing-go and spanprofiler in CLAUDE.md
and example READMEs to reflect the switch to OpenTelemetry and
otel-profiling-go.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@aleks-p aleks-p changed the title chore(tracing): switch from OpenTracing to OpenTelemetry chore(tracing): support for open telemetry traces Feb 20, 2026
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