-
Notifications
You must be signed in to change notification settings - Fork 451
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
Helper methods for accessing Span directly from Context in Span API #950
Comments
@jsuereth -
|
@jsuereth - would you please help clarifying the questions above. Thanks :) |
Sorry for huge delay in response. Just getting back to OSS things.
Yeah, the ask is move this out of the propagation package and have them "near" the span class. You can make them inline or static on
I'm suggesting, for consistency with other SDKs/APIs, that these methods live near the other context + span related methods. The Specification does NOT place these on Tracer, so it's a major inconsistency. You can leave the static methods on tracer, but I'd suggest you also provide them near the GetSpan/SetSpan methods and just have Tracer call into it. I'd also deprecate the |
The 1.0.0 specification states:
I was looking for documentation or example (e.g. context propagation) where this is done. In some languages, they provide helper methods directly on Span which will extract/insert into context (both explicitly or implicitly).
Specifically, I think this may need to be public: https://github.com/open-telemetry/opentelemetry-cpp/blob/main/api/include/opentelemetry/trace/propagation/detail/context.h#L14
It looks like these methods may be on Tracer: https://github.com/open-telemetry/opentelemetry-cpp/blob/main/api/include/opentelemetry/trace/tracer.h#L146. This is inconsistent with other APIs.
Ideally the propogation:detail + tracer methods would get reconciled into a standard header with Span <-> Context interaction.
The text was updated successfully, but these errors were encountered: