Skip to content
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

Merged
merged 2 commits into from
Apr 20, 2021

Conversation

HaloFour
Copy link
Contributor

@HaloFour HaloFour commented Apr 4, 2021

Adds an implementation of AsyncSpanEndStrategy which supports Reactor publishers returned from methods annotated with the @WithSpan annotation.

@HaloFour HaloFour force-pushed the withspan-async-reactor branch 2 times, most recently from 8df981b to cfa8236 Compare April 12, 2021 15:46
@HaloFour HaloFour marked this pull request as ready for review April 13, 2021 11:21
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);
Copy link
Member

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.

Copy link
Member

@mateuszrzeszutek mateuszrzeszutek left a 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 👍

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx!

@trask trask merged commit c7e4314 into open-telemetry:main Apr 20, 2021
@HaloFour HaloFour deleted the withspan-async-reactor branch July 17, 2021 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants