chore(tracing): support for open telemetry traces#4855
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: