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
Move SERVER and CLIENT span context keys out of BaseTracer #2468
Move SERVER and CLIENT span context keys out of BaseTracer #2468
Conversation
// TODO(anuraaga): Should probably be renamed to local root key since it could be a consumer span | ||
// or other non-server root. |
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've removed this TODO because it's possible to have a CONSUMER->CONSUMER trace (in case of batch receiving).
Closing and re-opening to re-trigger CLA check |
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/tracer/ClientSpan.java
Outdated
Show resolved
Hide resolved
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/tracer/ServerSpan.java
Outdated
Show resolved
Hide resolved
return context.get(KEY); | ||
} | ||
|
||
static Context with(Context context, Span clientSpan) { |
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 am not quite happy with this name. It seems like "client span with that context". Oh where are you, extension functions or infix operators!
But I don't have much better suggestions right now.
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.
Maybe add
is a bit better
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.
Oh where are you, extension functions or infix operators!
We can't switch to Kotlin this late in the game, can we? 😄
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.
Don't think so :)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Inspired by #1726 (comment)