Skip to content

feat(tracing): migrate from OpenTracing/Jaeger to OpenTelemetry#5456

Open
martinconic wants to merge 3 commits into
masterfrom
feat/opentelemetry-migration
Open

feat(tracing): migrate from OpenTracing/Jaeger to OpenTelemetry#5456
martinconic wants to merge 3 commits into
masterfrom
feat/opentelemetry-migration

Conversation

@martinconic
Copy link
Copy Markdown
Contributor

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Migrates bee's tracing stack from the archived OpenTracing API and
deprecated jaeger-client-go to the OpenTelemetry Go SDK with an
OTLP/HTTP exporter. The wrapper at pkg/tracing keeps a familiar API
shape so the call-site sweep is bounded to ~8 production files plus
the test suite.

Closes #5010.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

@martinconic martinconic marked this pull request as ready for review May 11, 2026 15:48
@martinconic martinconic requested review from acud, akrem-chabchoub, gacevicljubisa, janos and sbackend123 and removed request for gacevicljubisa May 11, 2026 15:49
Copy link
Copy Markdown
Contributor

@sbackend123 sbackend123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

SETUP_CONTRACT_IMAGE_TAG: "0.9.4"
BEELOCAL_BRANCH: "main"
BEEKEEPER_BRANCH: "master"
BEEKEEPER_BRANCH: "feat/bee-otlp-tracing-config"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before merge do not forget to switch beekeeper on master again

Comment thread pkg/tracing/tracing.go
Comment on lines +99 to +101
if ratio <= 0 {
ratio = 1
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not allow 0? It can serve as a switch off... Flag is already setting it by default to 1.

Comment thread cmd/bee/cmd/cmd.go
Comment on lines 42 to 46
optionNameTracingEnabled = "tracing-enable"
optionNameTracingEndpoint = "tracing-endpoint"
optionNameTracingHost = "tracing-host"
optionNameTracingPort = "tracing-port"
optionNameTracingOTLPEndpoint = "tracing-otlp-endpoint"
optionNameTracingOTLPInsecure = "tracing-otlp-insecure"
optionNameTracingSamplingRatio = "tracing-sampling-ratio"
optionNameTracingServiceName = "tracing-service-name"
Copy link
Copy Markdown
Member

@gacevicljubisa gacevicljubisa May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are changing this configuration, we can support nested flags as well for tracing:

tracing:
  enable: true
  otlp-endpoint: ...

Copy link
Copy Markdown
Member

@gacevicljubisa gacevicljubisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

docs: use of opentracing spans and jaeger with bee

3 participants