Skip to content
Merged
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 @@ -45,6 +45,8 @@ public AsyncPropagatingDisableInstrumentation() {
nameEndsWith("io.grpc.internal.ManagedChannelImpl");
private static final ElementMatcher<TypeDescription> REACTOR_DISABLED_TYPE_INITIALIZERS =
namedOneOf("reactor.core.scheduler.SchedulerTask", "reactor.core.scheduler.WorkerTask");
private static final ElementMatcher<TypeDescription> RXJAVA2_DISABLED_TYPE_INITIALIZERS =
named("io.reactivex.internal.schedulers.AbstractDirectTask");

@Override
public boolean onlyMatchKnownTypes() {
Expand Down Expand Up @@ -77,7 +79,8 @@ public String[] knownMatchingTypes() {
"net.sf.ehcache.store.disk.DiskStorageFactory",
"org.springframework.jms.listener.DefaultMessageListenerContainer",
"org.apache.activemq.broker.TransactionBroker",
"com.mongodb.internal.connection.DefaultConnectionPool$AsyncWorkManager"
"com.mongodb.internal.connection.DefaultConnectionPool$AsyncWorkManager",
"io.reactivex.internal.schedulers.AbstractDirectTask"
};
}

Expand All @@ -88,7 +91,10 @@ public String hierarchyMarkerType() {

@Override
public ElementMatcher<TypeDescription> hierarchyMatcher() {
return RX_WORKERS.or(GRPC_MANAGED_CHANNEL).or(REACTOR_DISABLED_TYPE_INITIALIZERS);
return RX_WORKERS
.or(GRPC_MANAGED_CHANNEL)
.or(REACTOR_DISABLED_TYPE_INITIALIZERS)
.or(RXJAVA2_DISABLED_TYPE_INITIALIZERS);
}

@Override
Expand Down Expand Up @@ -172,6 +178,8 @@ public void methodAdvice(MethodTransformer transformer) {
advice);
transformer.applyAdvice(
isTypeInitializer().and(isDeclaredBy(REACTOR_DISABLED_TYPE_INITIALIZERS)), advice);
transformer.applyAdvice(
isTypeInitializer().and(isDeclaredBy(RXJAVA2_DISABLED_TYPE_INITIALIZERS)), advice);
}

public static class DisableAsyncAdvice {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ class RxJava2Test extends InstrumentationSpecification {

public static final String EXCEPTION_MESSAGE = "test exception"

@Override
boolean useStrictTraceWrites() {
// TODO fix this by making sure that spans get closed properly
return false
}

@Shared
def addOne = { i ->
addOneFunc(i)
Expand Down
Loading