Muzzle Lettuce 5 Instrumentation
Add muzzle block and remove class loader matcher methods.
MODIFY
dd-java-agent/instrumentation/lettuce-5/lettuce-5.gradle
dd-java-agent/instrumentation/lettuce-5/lettuce-5.gradle
apply plugin: 'version-scan'
-versionScan {
+muzzle {
+ pass {
group = "io.lettuce"
module = "lettuce-core"
versions = "[5.0.0.RELEASE,)"
- scanDependencies = true
- verifyPresent = [
- "io.lettuce.core.RedisClient": null,
- ]
+ assertInverse = true
+ }
}
apply from: "${rootDir}/gradle/java.gradle"

MODIFY
dd-java-agent/instrumentation/lettuce-5/src/main/java/datadog/trace/instrumentation/lettuce/LettuceAsyncCommandsInstrumentation.java
dd-java-agent/instrumentation/lettuce-5/src/main/java/datadog/trace/instrumentation/lettuce/LettuceAsyncCommandsInstrumentation.java
package datadog.trace.instrumentation.lettuce;
-import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
import static net.bytebuddy.matcher.ElementMatchers.named;
import static net.bytebuddy.matcher.ElementMatchers.takesArgument;
@@ -27,11 +26,6 @@ public class LettuceAsyncCommandsInstrumentation extends Instrumenter.Default {
return named("io.lettuce.core.AbstractRedisAsyncCommands");
}
- @Override
- public ElementMatcher<ClassLoader> classLoaderMatcher() {
- return classLoaderHasClasses("io.lettuce.core.RedisClient");
- }
-
@Override
public String[] helperClassNames() {
return new String[] {

MODIFY
dd-java-agent/instrumentation/lettuce-5/src/main/java/datadog/trace/instrumentation/lettuce/LettuceClientInstrumentation.java
dd-java-agent/instrumentation/lettuce-5/src/main/java/datadog/trace/instrumentation/lettuce/LettuceClientInstrumentation.java
package datadog.trace.instrumentation.lettuce;
-import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
import static net.bytebuddy.matcher.ElementMatchers.isPrivate;
import static net.bytebuddy.matcher.ElementMatchers.nameEndsWith;
@@ -37,11 +36,6 @@ public final class LettuceClientInstrumentation extends Instrumenter.Default {
return named("io.lettuce.core.RedisClient");
}
- @Override
- public ElementMatcher<ClassLoader> classLoaderMatcher() {
- return classLoaderHasClasses("io.lettuce.core.RedisClient");
- }
-
@Override
public String[] helperClassNames() {
return HELPER_CLASS_NAMES;

MODIFY
dd-java-agent/instrumentation/lettuce-5/src/main/java/datadog/trace/instrumentation/lettuce/LettuceReactiveCommandsInstrumentation.java
dd-java-agent/instrumentation/lettuce-5/src/main/java/datadog/trace/instrumentation/lettuce/LettuceReactiveCommandsInstrumentation.java
package datadog.trace.instrumentation.lettuce;
-import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
import static net.bytebuddy.matcher.ElementMatchers.nameEndsWith;
import static net.bytebuddy.matcher.ElementMatchers.nameStartsWith;
@@ -30,11 +29,6 @@ public class LettuceReactiveCommandsInstrumentation extends Instrumenter.Default
return named("io.lettuce.core.AbstractRedisReactiveCommands");
}
- @Override
- public ElementMatcher<ClassLoader> classLoaderMatcher() {
- return classLoaderHasClasses("io.lettuce.core.RedisClient");
- }
-
@Override
public String[] helperClassNames() {
return new String[] {

Muzzle Lettuce 5 Instrumentation

Add muzzle block and remove class loader matcher methods.