feat(tracing): migrate from OpenTracing/Jaeger to OpenTelemetry#5456
feat(tracing): migrate from OpenTracing/Jaeger to OpenTelemetry#5456martinconic wants to merge 7 commits into
Conversation
sbackend123
left a comment
There was a problem hiding this comment.
I would explicitly call out in the PR description and in the docs which configuration flags were added / removed and that the tracing endpoint semantics changed. Without that, anyone still on the old configuration may be caught off guard.
gacevicljubisa
left a comment
There was a problem hiding this comment.
I would explicitly call out in the PR description and in the docs which configuration flags were added / removed and that the tracing endpoint semantics changed. Without that, anyone still on the old configuration may be caught off guard.
Yes, I agree. Updating the node with old config will result with "unknown flag" error.
Also, this is breaking change for the tracing for the node operators who are using tracing, they will need to switch to OTLP receiver, instead of jaeger UDP agent.
Additionally, OTel has a second exporter, otlptracegrpc. It might be worth to expose a tracing-otlp-protocol: http|grpc flag (defaulting to http), so operators can choose.
Checklist
Description
Migrates bee's tracing stack from the archived OpenTracing API and
deprecated
jaeger-client-goto the OpenTelemetry Go SDK with anOTLP exporter. The wrapper at
pkg/tracingkeeps a familiar APIshape so the call-site sweep is bounded to ~8 production files plus
the test suite.
Closes #5010.
The Jaeger UDP agent on port
:6831is no longer the receiver. Operatorsmust run an OTLP-capable collector (Jaeger v2, OpenTelemetry Collector, or any
backend with an OTLP receiver) and point bee at it. Upgrading a node with the
old config keys will fail startup with an
unknown parameterserror.Configuration flags
Removed:
tracing-endpoint(replaced bytracing-otlp-endpoint)tracing-host/tracing-port(folded intotracing-otlp-endpoint)Added:
tracing-otlp-endpoint127.0.0.1:4318host:port(default port is4318forhttp,4317forgrpc)tracing-otlp-insecuretruetracing-otlp-protocolhttphttporgrpctracing-sampling-ratio1.0[0, 1];0samples nothing,1samples everythingUnchanged:
tracing-enable,tracing-service-name.Nested YAML form
Tracing keys now also accept the nested form (mirroring
blockchain-rpc.*):Flat tracing-* keys still work; if both are present in the same config file,
the nested form wins and a warning is logged.
Wire-format compatibility
Spans propagated across libp2p streams use a new versioned binary carrier, and
the standard W3C traceparent header is used over HTTP. Mixed-version peers
will start fresh traces at the boundary rather than continuing the old Jaeger
binary format.
Coordination
Requires a paired beekeeper update — the workflow at
.github/workflows/beekeeper.yml temporarily points at
BEEKEEPER_BRANCH: feat/bee-otlp-tracing-config and must be flipped back to
master before merging this PR (and after the beekeeper PR lands).
Motivation and Context (Optional)
OpenTracing is archived and jaeger-client-go is deprecated; OpenTelemetry is
the supported successor. Migrating now lets bee plug into any OTLP-capable
backend (Jaeger v2, OTel Collector, vendor agents) and unlocks adopting
semconv and tail-sampling at the collector layer in follow-up work.
AI Disclosure