-
Notifications
You must be signed in to change notification settings - Fork 944
Reactor Netty: emit actual HTTP client spans spans on connection errors #9063
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
Reactor Netty: emit actual HTTP client spans spans on connection errors #9063
Conversation
.../opentelemetry/instrumentation/netty/v4/common/internal/client/NettyInstrumentationFlag.java
Outdated
Show resolved
Hide resolved
ERROR_ONLY, | ||
DISABLED; | ||
|
||
public static NettyInstrumentationFlag enabledOrErrorOnly(boolean b) { |
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.
this method name confused me, but I can't think of a better one...
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 couldn't either - if anyone has a suggestion, I'm all ears
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.
What do you think about calling it fromBoolean(..)
?
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.
What do you think about calling it
fromBoolean(..)
?
I'm not too fond of this, because it's a conversion of 2-value type to 3-value type -- and the simple fromBoolean
doesn't really say what happens to the 3rd value.
3de3908
to
c590ae8
Compare
false, | ||
false, | ||
NettyConnectionInstrumentationFlag.DISABLED, | ||
NettyConnectionInstrumentationFlag.DISABLED, |
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 does this one not use the config?
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.
It's a library instrumentation, I think it just can't implement the connection telemetry stuff.
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.
Had a small question and a couple nits, but this looks good. Thanks for following up after the other work! 👍🏻
.../io/opentelemetry/javaagent/instrumentation/reactornetty/v1_0/FailedRequestWithUrlMaker.java
Show resolved
Hide resolved
.../io/opentelemetry/javaagent/instrumentation/reactornetty/v1_0/FailedRequestWithUrlMaker.java
Outdated
Show resolved
Hide resolved
.../io/opentelemetry/javaagent/instrumentation/reactornetty/v1_0/FailedRequestWithUrlMaker.java
Show resolved
Hide resolved
8097745
to
e79c943
Compare
if ("http://localhost:61/".equals(uri.toString()) | ||
|| "https://192.0.2.1/".equals(uri.toString())) { | ||
return emptySet(); | ||
attributes.remove(SemanticAttributes.NET_PROTOCOL_NAME); | ||
attributes.remove(SemanticAttributes.NET_PROTOCOL_VERSION); | ||
} |
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.
nice
false, | ||
connectionTelemetryEnabled | ||
? NettyConnectionInstrumentationFlag.ENABLED | ||
: NettyConnectionInstrumentationFlag.DISABLED, |
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 it not ERROR_ONLY
because we capture those spans already in reactor-netty 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.
Yes, exactly that
Continuation of #8111