Put guard to make sure reactve supplier is not instrumented by sleuth

This commit is contained in:
Oleg Zhurakousky
2021-07-09 16:20:15 +02:00
parent 74a867cd2f
commit 4d0452a5dc

View File

@@ -40,7 +40,7 @@ public abstract class FunctionAroundWrapper implements BiFunction<Object, Functi
if (input instanceof Message) {
return this.doApply((Message<byte[]>) input, targetFunction);
}
else if (targetFunction.isSupplier()) {
else if (targetFunction.isSupplier() && !targetFunction.isOutputTypePublisher()) {
return this.doApply(null, targetFunction);
}
return targetFunction.apply(input);