-
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 AsyncSpanEndStrategy for Reactor 3.x instrumentation #2714
Conversation
8df981b
to
cfa8236
Compare
242fcb9
to
1529c1c
Compare
import io.opentelemetry.instrumentation.reactor.TracingOperator; | ||
import net.bytebuddy.asm.Advice; | ||
|
||
public class ReactorHooksAdvice { | ||
@Advice.OnMethodExit(suppress = Throwable.class) | ||
public static void postStaticInitializer() { | ||
TracingOperator.registerOnEachOperator(); | ||
AsyncSpanEndStrategies.getInstance().registerStrategy(ReactorAsyncSpanEndStrategy.INSTANCE); |
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.
How about adding this to TracingOperator
? In the RxJava2 instrumentation the async span strategy is also usable by the library instrumentation.
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.
Thanks! That looks great 👍
4537f9a
to
f9a37af
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.
thx!
Adds an implementation of
AsyncSpanEndStrategy
which supports Reactor publishers returned from methods annotated with the@WithSpan
annotation.