-
Notifications
You must be signed in to change notification settings - Fork 859
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
Add Context to SpanProcessor methods #1811
Comments
HI @parallelstream . If you want to change the Thanks! |
Thanks, @jkwatson. Right now I will be fine with just onStart() changes, but think at some stage we would come to the need of onEnd() taking context as well for exact same reasoning. |
I would go ahead and mention it, and your use-case in the discussion on that issue. I'm sure they'll tell you if they want to roll it in, or open a separate one. :) |
@parallelstream Which Context do you want in onEnd? Also the parent context? Then we would need to store the parent Context somewhere. In open-telemetry/opentelemetry-specification#875 that originally added this, I originally had specified to add the full parent Context to the SpanData, but that idea was shot down due to performance concerns (unfortunately in a Spec SIG meeting so there is not much documentation on the ticket: open-telemetry/opentelemetry-specification#875 (comment)). So IMHO: Instead of passing the context to OnEnd, we should either: add the parent Context to SpanData; or leave it as-is with not require storing the parent Context. |
@parallelstream closing this since the "End" call on the Span does not accept a context, because of this the only thing that the SDK can provide is the If we will add support for user to pass a different |
Is your feature request related to a problem? Please describe.
I would like to use information from Context (Baggage in particular) in SpanProcessor's methods. Currently SpanProcessor's methods don't take Context
Describe the solution you'd like
Describe alternatives you've considered
The only option is to rely on Context.current() in SpanProcessor which is not the right thing when in all cases - for example parent is explicitly set to the specific Context (and also, this will not work for e.g. Go version where there's no Context.current())
The text was updated successfully, but these errors were encountered: