-
Notifications
You must be signed in to change notification settings - Fork 867
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 asynchronous tracing to Spring Boot Autoconfigure WithSpanAspect #2618
Conversation
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.
👍
...java/io/opentelemetry/instrumentation/spring/autoconfigure/aspects/WithSpanAspectTracer.java
Outdated
Show resolved
Hide resolved
@@ -2,4 +2,4 @@ | |||
* Provides implementations of strategies for tracing methods that return asynchronous and reactive | |||
* values so that the span can be ended when the asynchronous operation completes. | |||
*/ | |||
package io.opentelemetry.javaagent.instrumentation.otelannotations.async; | |||
package io.opentelemetry.instrumentation.api.tracer.async; |
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 .async
-> .future
or .promise
.async
feels a bit general
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'd probably gravitate to reactive
but that's probably as general as async
is. Of your suggestions I think future
probably fits better in the Java ecosystem.
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.
WDYT about renaming MethodSpanStrategy/-ies
to AsyncSpanEndStrategy/-ies
? (or something similar that emphasises the asynchronous nature of this code)
that sounds nice, and if we don't find an AsyncSpanEndStrategy, we can handle the default synchronous case without a strategy, e.g.
|
That sounds good to me. If the interface is |
Ya, let's keep it |
@HaloFour looks like it needs a |
834b838
to
e511b65
Compare
🚢 |
Shweet! Looking at the changes I think that maybe |
👍 (not a problem even if it was public, as none of the instrumentation APIs have been declared stable yet) |
Updates the WithSpanAspect in Spring Boot Autoconfigure module to support asynchronous return types. Refactors the MethodSpanStrategies implementations from OpenTelemetry Annotations module to enable sharing between instrumentation projects.
Open question: Should the async method strategy machinery belong in the instrumentation-api module or would it be better suited in a separate AOP module?