Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Baggage handling in the OpenTracing Shim layer. #2194

Merged

Conversation

carlosalberto
Copy link
Contributor

Baggage is NOT directly associated with an OpenTelemetry Span directly anymore, but with the OpenTracing Shim layer, which greatly simplifies its handling (no more global dictionary or extra field in Spans).

This comes with the recommendation of NOT consuming the OpenTelemetry API and the OpenTracing Shim the codebase, as the Span's associated Baggage may be lost during in-process or inter-process propagation.

I have a prototype for this in Java.

I'd added thread-safety requirements for Baggage consumption, even if it doesn't exist in the original OpenTracing Specification, as those calls are thread-safe anyway in most of (all?) OpenTracing compliant tracers.

Fixes #2137

Baggage is NOT directly associated with an OpenTelemetry Span
directly anymore, but with the OpenTracing Shim, which
greatly simplifies its handling.

This comes with the recommendation of NOT consuming the
OpenTelemetry API and the OpenTracing Shim the codebase,
as the Span's associated Baggage may be lost during
in-process or inter-process Propagation.
@carlosalberto
Copy link
Contributor Author

Ping @yurishkuro

specification/compatibility/opentracing.md Outdated Show resolved Hide resolved
@carlosalberto
Copy link
Contributor Author

@yurishkuro Updated to discourage users from using the OT Shim along the OTel API only if baggage is used.

Copy link
Contributor

@jmacd jmacd left a comment

Choose a reason for hiding this comment

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

I believe the OTel-Go bridge/opentracing goes extensively out of it's way to make the behavior being specified here work, also (a) I'm not 100% certain of this statement because the code is difficult to follow, and (b) if I'm proven correct then we ought to simplify the code based on this spec change. I'll file an issue if you agree @carlosalberto.

@carlosalberto carlosalberto merged commit 47af705 into open-telemetry:main Dec 10, 2021
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.

OpenTracing layer support for Baggage
4 participants