-
Notifications
You must be signed in to change notification settings - Fork 791
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 support for Reactor Netty's HttpClient #1601
Conversation
Yes, definitely 😛
Without refactoring |
.../opentelemetry/javaagent/instrumentation/reactor_netty/ReactorHttpClientInstrumentation.java
Outdated
Show resolved
Hide resolved
…ry/javaagent/instrumentation/reactor_netty/ReactorHttpClientInstrumentation.java Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
...elemetry/javaagent/instrumentation/reactor_netty/ReactorHttpClientInstrumentationModule.java
Outdated
Show resolved
Hide resolved
instrumentation/reactor-netty-0.9/src/test/groovy/HttpClientTest.groovy
Outdated
Show resolved
Hide resolved
...opentelemetry/javaagent/instrumentation/reactor_netty/ReactorNettyInstrumentationModule.java
Outdated
Show resolved
Hide resolved
...opentelemetry/javaagent/instrumentation/reactor_netty/ReactorNettyInstrumentationModule.java
Outdated
Show resolved
Hide resolved
implements BiFunction<Mono<? extends Connection>, Bootstrap, Mono<? extends Connection>> { | ||
@Override | ||
public Mono<? extends Connection> apply(Mono<? extends Connection> m, Bootstrap b) { | ||
return m.subscriberContext(s -> s.put("otel_context", Context.current())); |
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.
is this attribute name shared with any other instrumentation? if not, maybe name it reactor_netty_otel_context
?
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.
Why, what difference does it make apart having longer key? :)
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.
when I saw this, the general name gave me the impression that this (reactor) context key was being used to propagate the (otel) context more generally for all reactor 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.
Weeeeellll. That may be totally not a bad idea...
Newly added test fails without this instrumentation.
@mateuszrzeszutek should I re-do this as
InstrumentationModule
? Can I somehow avoid duplicating all Netty's helper classes?