Muzzle Jedis Instrumentation
Add muzzle block and remove class loader matcher method.
MODIFY
dd-java-agent/instrumentation/jedis-1.4/jedis-1.4.gradle
dd-java-agent/instrumentation/jedis-1.4/jedis-1.4.gradle
-apply plugin: 'version-scan'
-
-versionScan {
+muzzle {
+ pass {
group = "redis.clients"
module = "jedis"
versions = "[1.4.0,)"
- legacyModule = "jms-api"
- verifyPresent = [
- 'redis.clients.jedis.Protocol$Command': null,
- ]
+ assertInverse = true
+ }
}
apply from: "${rootDir}/gradle/java.gradle"

MODIFY
dd-java-agent/instrumentation/jedis-1.4/src/main/java/datadog/trace/instrumentation/jedis/JedisInstrumentation.java
dd-java-agent/instrumentation/jedis-1.4/src/main/java/datadog/trace/instrumentation/jedis/JedisInstrumentation.java
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[] {};

Muzzle Jedis Instrumentation

Add muzzle block and remove class loader matcher method.