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
Run context customizers before span start instead of after #6634
Conversation
@@ -196,7 +189,13 @@ private Context doStart(Context parentContext, REQUEST request, @Nullable Instan | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OperationListener
need to get the context with the newly created span, so that they have the proper exemplars
for (ContextCustomizer<? super REQUEST> contextCustomizer : contextCustomizers) { | ||
context = contextCustomizer.onStart(context, request, attributes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should rename the first param of ContextCustomizer#onStart()
to parentContext
too
02b9aec
to
7a53b3a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this PR 👍
It is perhaps a little risky with the behavior change, but I believe it doesn't stray from the original intention behind the ContextCustomizer
API.
I added to SIG agenda for tomorrow to get any last opinions |
Going ahead and merging this for next week's release |
…metry#6634) ...so that they can have access to the parent span context, and so that their additions to the context will be visible to span processors
…metry#6634) ...so that they can have access to the parent span context, and so that their additions to the context will be visible to span processors
…metry#6634) ...so that they can have access to the parent span context, and so that their additions to the context will be visible to span processors
...so that they can have access to the parent span context, and so that their additions to the context will be visible to span processors