-
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
Netty4.1: remove our handler when original handler is removed #3026
Conversation
.../opentelemetry/javaagent/instrumentation/netty/v4_1/NettyChannelPipelineInstrumentation.java
Outdated
Show resolved
Hide resolved
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.
can you add a test, similar to the one for removing future listeners? https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/netty/netty-4.1/javaagent/src/test/groovy/ChannelFutureTest.groovy
instrumentation/netty/netty-4.1/javaagent/src/test/groovy/ChannelPipelineTest.groovy
Show resolved
Hide resolved
…nelPipelineTest.groovy Co-authored-by: Mateusz Rzeszutek <[email protected]>
@@ -40,7 +39,7 @@ | |||
@Override | |||
public void transform(TypeTransformer transformer) { | |||
transformer.applyAdviceToMethod( | |||
isMethod().and(nameStartsWith("write")), | |||
isMethod().and(named("write").or(named("writeAndFlush"))), |
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.
epoll & kqueue channel implementations have methods starting with write that shouldn't be instrumented
Resolves #1373