Muzzle Jetty Instrumentation

Add muzzle block and remove class loader matcher method.
This commit is contained in:
Gary Huang 2018-09-07 17:15:35 -04:00
parent 0f3e119ae5
commit a8f52d8c52
No known key found for this signature in database
GPG Key ID: 225B4CE0235DF2D1
2 changed files with 7 additions and 15 deletions

View File

@ -1,12 +1,10 @@
apply plugin: 'version-scan'
versionScan {
group = "org.eclipse.jetty"
module = 'jetty-server'
versions = "[8.0.0.v20110901,)"
verifyMissing = [
"org.eclipse.jetty.server.AsyncContext",
]
muzzle {
pass {
group = "org.eclipse.jetty"
module = 'jetty-server'
versions = "[8.0.0.v20110901,)"
assertInverse = true
}
}
apply from: "${rootDir}/gradle/java.gradle"

View File

@ -1,7 +1,6 @@
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[] {