Muzzle Jedis Instrumentation

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

View File

@ -1,13 +1,10 @@
apply plugin: 'version-scan' muzzle {
pass {
versionScan {
group = "redis.clients" group = "redis.clients"
module = "jedis" module = "jedis"
versions = "[1.4.0,)" versions = "[1.4.0,)"
legacyModule = "jms-api" assertInverse = true
verifyPresent = [ }
'redis.clients.jedis.Protocol$Command': null,
]
} }
apply from: "${rootDir}/gradle/java.gradle" apply from: "${rootDir}/gradle/java.gradle"

View File

@ -1,6 +1,5 @@
package datadog.trace.instrumentation.jedis; package datadog.trace.instrumentation.jedis;
import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
import static io.opentracing.log.Fields.ERROR_OBJECT; import static io.opentracing.log.Fields.ERROR_OBJECT;
import static net.bytebuddy.matcher.ElementMatchers.isMethod; import static net.bytebuddy.matcher.ElementMatchers.isMethod;
import static net.bytebuddy.matcher.ElementMatchers.isPublic; import static net.bytebuddy.matcher.ElementMatchers.isPublic;
@ -38,11 +37,6 @@ public final class JedisInstrumentation extends Instrumenter.Default {
return named("redis.clients.jedis.Protocol"); return named("redis.clients.jedis.Protocol");
} }
@Override
public ElementMatcher<ClassLoader> classLoaderMatcher() {
return classLoaderHasClasses("redis.clients.jedis.Protocol$Command");
}
@Override @Override
public String[] helperClassNames() { public String[] helperClassNames() {
return new String[] {}; return new String[] {};