gross hack for muzzle
MODIFY
dd-java-agent/instrumentation/netty-3.9/src/main/java/datadog/trace/instrumentation/netty39/ChannelFutureListenerInstrumentation.java
dd-java-agent/instrumentation/netty-3.9/src/main/java/datadog/trace/instrumentation/netty39/ChannelFutureListenerInstrumentation.java
@@ -39,7 +39,11 @@ public class ChannelFutureListenerInstrumentation extends Instrumenter.Default {
@Override
public ElementMatcher<ClassLoader> classLoaderMatcher() {
// Optimization for expensive typeMatcher.
- return hasClassesNamed("org.jboss.netty.channel.ChannelFutureListener");
+ return hasClassesNamed(
+ "org.jboss.netty.channel.ChannelFutureListener",
+ "org.jboss.netty.buffer.EmptyChannelBuffer", // Not in 3.8
+ "org.jboss.netty.channel.StaticChannelPipeline" // Not in 3.10
+ );
}
@Override
@@ -51,6 +55,7 @@ public class ChannelFutureListenerInstrumentation extends Instrumenter.Default {
public String[] helperClassNames() {
return new String[] {
packageName + ".ChannelState",
+ packageName + ".ChannelState$Factory",
packageName + ".server.NettyHttpServerDecorator",
packageName + ".server.NettyRequestExtractAdapter"
};

MODIFY
dd-java-agent/instrumentation/netty-3.9/src/main/java/datadog/trace/instrumentation/netty39/NettyChannelInstrumentation.java
dd-java-agent/instrumentation/netty-3.9/src/main/java/datadog/trace/instrumentation/netty39/NettyChannelInstrumentation.java
@@ -32,7 +32,11 @@ public class NettyChannelInstrumentation extends Instrumenter.Default {
@Override
public ElementMatcher<ClassLoader> classLoaderMatcher() {
// Optimization for expensive typeMatcher.
- return hasClassesNamed("org.jboss.netty.channel.Channel");
+ return hasClassesNamed(
+ "org.jboss.netty.channel.Channel",
+ "org.jboss.netty.buffer.EmptyChannelBuffer", // Not in 3.8
+ "org.jboss.netty.channel.StaticChannelPipeline" // Not in 3.10
+ );
}
@Override
@@ -42,7 +46,7 @@ public class NettyChannelInstrumentation extends Instrumenter.Default {
@Override
public String[] helperClassNames() {
- return new String[] {packageName + ".ChannelState"};
+ return new String[] {packageName + ".ChannelState", packageName + ".ChannelState$Factory"};
}
@Override

MODIFY
dd-java-agent/instrumentation/netty-3.9/src/main/java/datadog/trace/instrumentation/netty39/NettyChannelPipelineInstrumentation.java
dd-java-agent/instrumentation/netty-3.9/src/main/java/datadog/trace/instrumentation/netty39/NettyChannelPipelineInstrumentation.java
@@ -48,7 +48,11 @@ public class NettyChannelPipelineInstrumentation extends Instrumenter.Default {
@Override
public ElementMatcher<ClassLoader> classLoaderMatcher() {
// Optimization for expensive typeMatcher.
- return hasClassesNamed("org.jboss.netty.channel.ChannelPipeline");
+ return hasClassesNamed(
+ "org.jboss.netty.channel.ChannelPipeline",
+ "org.jboss.netty.buffer.EmptyChannelBuffer", // Not in 3.8
+ "org.jboss.netty.channel.StaticChannelPipeline" // Not in 3.10
+ );
}
@Override
@@ -60,6 +64,10 @@ public class NettyChannelPipelineInstrumentation extends Instrumenter.Default {
public String[] helperClassNames() {
return new String[] {
packageName + ".ChannelState",
+ packageName + ".ChannelState$Factory",
+ NettyChannelPipelineInstrumentation.class.getName() + "$ChannelPipelineAdviceUtil",
+ // Util
+ packageName + ".util.CombinedSimpleChannelHandler",
// client helpers
packageName + ".client.NettyHttpClientDecorator",
packageName + ".client.NettyResponseInjectAdapter",

gross hack for muzzle