Muzzle servlet-3 Instrumentation
Add muzzle block and remove class loader matcher method.
MODIFY
dd-java-agent/instrumentation/servlet-3/servlet-3.gradle
dd-java-agent/instrumentation/servlet-3/servlet-3.gradle
-apply plugin: 'version-scan'
-
-versionScan {
+muzzle {
+ pass {
group = "javax.servlet"
module = 'javax.servlet-api'
- legacyModule = "servlet-api"
versions = "[3.0,)"
- verifyPresent = [
- "javax.servlet.AsyncEvent" : null,
- "javax.servlet.AsyncListener": null,
- ]
+ assertInverse = true
+ }
}
apply from: "${rootDir}/gradle/java.gradle"

MODIFY
dd-java-agent/instrumentation/servlet-3/src/main/java/datadog/trace/instrumentation/servlet3/AbstractServlet3Instrumentation.java
dd-java-agent/instrumentation/servlet-3/src/main/java/datadog/trace/instrumentation/servlet3/AbstractServlet3Instrumentation.java
package datadog.trace.instrumentation.servlet3;
-import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
-
import datadog.trace.agent.tooling.Instrumenter;
-import net.bytebuddy.matcher.ElementMatcher;
public abstract class AbstractServlet3Instrumentation extends Instrumenter.Default {
@@ -11,11 +8,6 @@ public abstract class AbstractServlet3Instrumentation extends Instrumenter.Defau
super("servlet", "servlet-3");
}
- @Override
- public ElementMatcher<ClassLoader> classLoaderMatcher() {
- return classLoaderHasClasses("javax.servlet.AsyncEvent", "javax.servlet.AsyncListener");
- }
-
@Override
public String[] helperClassNames() {
return new String[] {

Muzzle servlet-3 Instrumentation

Add muzzle block and remove class loader matcher method.