-
Notifications
You must be signed in to change notification settings - Fork 838
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
Why does BatchSpanProcessor.onStart() not include the parentContext param? #2756
Comments
The On caller side in SDK the context is given, see
But skipping the argument has the negative side effect that extending the |
created #2757 |
Thanks for the quick response.
Sorry, I understood the language reason for it, but was curious if there was a specification or other reason that I'd missed. Obviously #2757 answers that :-) |
I would say it was just an oversight and as there is no tooling to tell us about such issue. I fear that there are more similar places as it is quite common to skip arguments you don't use (to avoid that lint complains about unused arguments). Not sure if there is a lint rule to tell us such problems. |
Yes, SimpleSpanProcessor has the same issue. |
That is covered by my PR. For this case I know the history - the additional context argument was added in spec after the spanprocessors were already implemented a while. |
Related to this issue & related PR where the other onStart() signatures were updated.
The spec says:
BatchSpanProcessor.onStart is currently defined as:
and is the only processor without the context param in its onStart().
The background for this is that I'm implementing something along the lines of the custom batch processor shown here.
When creating a span with a context that has baggage attributes but is not the active context, then the custom processor is not passed the correct context when called in the Span constructor and the baggage is not propogated.
Curious if there is a reason for this?
The text was updated successfully, but these errors were encountered: