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 support for Reactor Netty's HttpClient #1601

Merged
merged 8 commits into from
Nov 16, 2020

Conversation

iNikem
Copy link
Contributor

@iNikem iNikem commented Nov 9, 2020

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?

@mateuszrzeszutek
Copy link
Member

should I re-do this as InstrumentationModule?

Yes, definitely 😛

Can I somehow avoid duplicating all Netty's helper classes?

Without refactoring AttributeKeys - no, not right now. You won't have to list them all after #1374 is implemented

iNikem and others added 2 commits November 10, 2020 14:34
…ry/javaagent/instrumentation/reactor_netty/ReactorHttpClientInstrumentation.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
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()));
Copy link
Member

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?

Copy link
Contributor Author

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? :)

Copy link
Member

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

Copy link
Contributor Author

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...

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.

None yet

4 participants