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'
versionScan {
group = "redis.clients"
module = "jedis"
versions = "[1.4.0,)"
legacyModule = "jms-api"
verifyPresent = [
'redis.clients.jedis.Protocol$Command': null,
]
muzzle {
pass {
group = "redis.clients"
module = "jedis"
versions = "[1.4.0,)"
assertInverse = true
}
}
apply from: "${rootDir}/gradle/java.gradle"

View File

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