netty-4.1 muzzle
MODIFY
dd-java-agent/instrumentation/netty-4.0/src/main/java/datadog/trace/instrumentation/netty40/ChannelFutureListenerInstrumentation.java
dd-java-agent/instrumentation/netty-4.0/src/main/java/datadog/trace/instrumentation/netty40/ChannelFutureListenerInstrumentation.java
@@ -38,7 +38,14 @@ public class ChannelFutureListenerInstrumentation extends Instrumenter.Default {
@Override
public String[] helperClassNames() {
- return new String[] {packageName + ".AttributeKeys"};
+ return new String[] {
+ packageName + ".AttributeKeys",
+ // server helpers
+ packageName + ".server.NettyRequestExtractAdapter",
+ packageName + ".server.HttpServerRequestTracingHandler",
+ packageName + ".server.HttpServerResponseTracingHandler",
+ packageName + ".server.HttpServerTracingHandler"
+ };
}
@Override

MODIFY
dd-java-agent/instrumentation/netty-4.1/netty-4.1.gradle
dd-java-agent/instrumentation/netty-4.1/netty-4.1.gradle
-apply plugin: 'version-scan'
+apply from: "${rootDir}/gradle/java.gradle"
-versionScan {
+muzzle {
+ pass {
group = "io.netty"
module = "netty-codec-http"
- legacyModule = "netty"
versions = "[4.1.0.Final,)"
- verifyPresent = [
- "io.netty.handler.codec.http.HttpHeaderValues": null,
- ]
+ assertInverse = true
+ }
+ pass {
+ group = "io.netty"
+ module = "netty"
+ versions = "[4.1.0.Final,)"
+ assertInverse = true
+ }
}
-
-apply from: "${rootDir}/gradle/java.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

MODIFY
dd-java-agent/instrumentation/netty-4.1/src/main/java/datadog/trace/instrumentation/netty41/ChannelFutureListenerInstrumentation.java
dd-java-agent/instrumentation/netty-4.1/src/main/java/datadog/trace/instrumentation/netty41/ChannelFutureListenerInstrumentation.java
package datadog.trace.instrumentation.netty41;
import static datadog.trace.agent.tooling.ByteBuddyElementMatchers.safeHasSuperType;
-import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
import static io.opentracing.log.Fields.ERROR_OBJECT;
import static net.bytebuddy.matcher.ElementMatchers.isInterface;
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
@@ -37,14 +36,16 @@ public class ChannelFutureListenerInstrumentation extends Instrumenter.Default {
.and(safeHasSuperType(named("io.netty.channel.ChannelFutureListener")));
}
- @Override
- public ElementMatcher<ClassLoader> classLoaderMatcher() {
- return classLoaderHasClasses("io.netty.handler.codec.http.HttpHeaderValues");
- }
-
@Override
public String[] helperClassNames() {
- return new String[] {packageName + ".AttributeKeys"};
+ return new String[] {
+ packageName + ".AttributeKeys",
+ // server helpers
+ packageName + ".server.NettyRequestExtractAdapter",
+ packageName + ".server.HttpServerRequestTracingHandler",
+ packageName + ".server.HttpServerResponseTracingHandler",
+ packageName + ".server.HttpServerTracingHandler"
+ };
}
@Override

MODIFY
dd-java-agent/instrumentation/netty-4.1/src/main/java/datadog/trace/instrumentation/netty41/NettyChannelPipelineInstrumentation.java
dd-java-agent/instrumentation/netty-4.1/src/main/java/datadog/trace/instrumentation/netty41/NettyChannelPipelineInstrumentation.java
package datadog.trace.instrumentation.netty41;
import static datadog.trace.agent.tooling.ByteBuddyElementMatchers.safeHasSuperType;
-import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
import static net.bytebuddy.matcher.ElementMatchers.isInterface;
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
import static net.bytebuddy.matcher.ElementMatchers.nameStartsWith;
@@ -48,11 +47,6 @@ public class NettyChannelPipelineInstrumentation extends Instrumenter.Default {
return not(isInterface()).and(safeHasSuperType(named("io.netty.channel.ChannelPipeline")));
}
- @Override
- public ElementMatcher<ClassLoader> classLoaderMatcher() {
- return classLoaderHasClasses("io.netty.handler.codec.http.HttpHeaderValues");
- }
-
@Override
public String[] helperClassNames() {
return new String[] {

netty-4.1 muzzle