Muzzle Jetty Instrumentation
Add muzzle block and remove class loader matcher method.
MODIFY
dd-java-agent/instrumentation/jetty-8/jetty-8.gradle
dd-java-agent/instrumentation/jetty-8/jetty-8.gradle
-apply plugin: 'version-scan'
-
-versionScan {
+muzzle {
+ pass {
group = "org.eclipse.jetty"
module = 'jetty-server'
versions = "[8.0.0.v20110901,)"
- verifyMissing = [
- "org.eclipse.jetty.server.AsyncContext",
- ]
+ assertInverse = true
+ }
}
apply from: "${rootDir}/gradle/java.gradle"

MODIFY
dd-java-agent/instrumentation/jetty-8/src/main/java/datadog/trace/instrumentation/jetty8/HandlerInstrumentation.java
dd-java-agent/instrumentation/jetty-8/src/main/java/datadog/trace/instrumentation/jetty8/HandlerInstrumentation.java
package datadog.trace.instrumentation.jetty8;
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.isPublic;
import static net.bytebuddy.matcher.ElementMatchers.named;
@@ -35,11 +34,6 @@ public final class HandlerInstrumentation extends Instrumenter.Default {
.and(not(named("org.eclipse.jetty.server.handler.HandlerWrapper")));
}
- @Override
- public ElementMatcher<ClassLoader> classLoaderMatcher() {
- return not(classLoaderHasClasses("org.eclipse.jetty.server.AsyncContext"));
- }
-
@Override
public String[] helperClassNames() {
return new String[] {

Muzzle Jetty Instrumentation
Add muzzle block and remove class loader matcher method.