diff --git a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/reactor/ReactorHooksHelper.java b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/reactor/ReactorHooksHelper.java index 5f7731a22..dd759fbbd 100644 --- a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/reactor/ReactorHooksHelper.java +++ b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/reactor/ReactorHooksHelper.java @@ -129,14 +129,13 @@ final class ReactorHooksHelper { if (isTraceContextPropagator(current)) { return false; } - if (!isLifter(current)) { - if (!isSync(current)) { - return true; - } - if (isSourceProducer(current)) { - return false; - } + if (!isSync(current)) { + return true; + } + + if (isSourceProducer(current)) { + return false; } current = getParent(current); @@ -165,18 +164,6 @@ final class ReactorHooksHelper { return null; } - private static boolean isReactorCorePublisher(String pubClassName) { - return pubClassName != null && pubClassName.startsWith("reactor.core.publisher"); - } - - private static boolean isLifter(Publisher current) { - if (current == null) { - return false; - } - String name = current.getClass().getName(); - return isReactorCorePublisher(name) && ((name.endsWith("Lift") || name.endsWith("LiftFuseable"))); - } - /** * Decorates {@link Publisher} with {@link TraceContextPropagator} {@code Publisher}. * Mostly it is a copy of reactor-core logic from