Fix jeddis muzzle failure (#4570)

This commit is contained in:
Lauri Tulmin 2021-11-02 20:33:18 +02:00 committed by GitHub
parent 73a28dadb4
commit 24f01c6b5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -21,6 +21,7 @@ dependencies {
// ensures jedis-1.4 instrumentation does not load with jedis 3.0+ by failing
// the tests in the event it does. The tests will end up with double spans
testInstrumentation(project(":instrumentation:jedis:jedis-1.4:javaagent"))
testInstrumentation(project(":instrumentation:jedis:jedis-4.0:javaagent"))
latestDepTestLibrary("redis.clients:jedis:3.+")
}

View File

@ -24,7 +24,10 @@ public class JedisInstrumentationModule extends InstrumentationModule {
@Override
public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
return not(hasClassesNamed("redis.clients.jedis.CommandArguments"));
// missing in 2.x
return hasClassesNamed("redis.clients.jedis.commands.BasicCommands")
// added in 4.0
.and(not(hasClassesNamed("redis.clients.jedis.CommandArguments")));
}
@Override