Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public AsyncPropagatingDisableInstrumentation() {
named("io.reactivex.internal.schedulers.AbstractDirectTask");
private static final ElementMatcher<TypeDescription> JAVA_HTTP_CLIENT =
extendsClass(named("java.net.http.HttpClient"));
private static final String LETTUCE_HANDSHAKE_HANDLER =
"io.lettuce.core.protocol.RedisHandshakeHandler";

@Override
public boolean onlyMatchKnownTypes() {
Expand Down Expand Up @@ -83,7 +85,8 @@ public String[] knownMatchingTypes() {
"org.apache.activemq.broker.TransactionBroker",
"com.mongodb.internal.connection.DefaultConnectionPool$AsyncWorkManager",
"io.reactivex.internal.schedulers.AbstractDirectTask",
"jdk.internal.net.http.HttpClientImpl"
"jdk.internal.net.http.HttpClientImpl",
LETTUCE_HANDSHAKE_HANDLER
};
}

Expand Down Expand Up @@ -185,6 +188,8 @@ public void methodAdvice(MethodTransformer transformer) {
transformer.applyAdvice(
isTypeInitializer().and(isDeclaredBy(RXJAVA2_DISABLED_TYPE_INITIALIZERS)), advice);
transformer.applyAdvice(namedOneOf("sendAsync").and(isDeclaredBy(JAVA_HTTP_CLIENT)), advice);
transformer.applyAdvice(
named("channelRegistered").and(isDeclaredBy(named(LETTUCE_HANDSHAKE_HANDLER))), advice);
Comment thread
amarziali marked this conversation as resolved.
}

public static class DisableAsyncAdvice {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ abstract class Lettuce5ClientTestBase extends VersionedNamingTestBase {
RedisAsyncCommands<String, ?> asyncCommands
RedisCommands<String, ?> syncCommands

@Override
boolean useStrictTraceWrites() {
// latest seems leaking continuations that terminates later hence the strict trace will discard our spans.
!isLatestDepTest
}


def setup() {
redisServer.start()
println "Using redis: $redisServer.redisURI"
Expand Down