Revert "* Simplify functionalTracingEnabled variable logic"

This reverts commit 49e027a0ee.
This commit is contained in:
Soby Chacko
2022-02-11 12:41:27 -05:00
parent a8ac826254
commit 0cbd5e8fbf
2 changed files with 3 additions and 38 deletions

View File

@@ -38,8 +38,9 @@ public abstract class FunctionAroundWrapper implements BiFunction<Object, Functi
@Override
public final Object apply(Object input, FunctionInvocationWrapper targetFunction) {
String functionalTracingEnabledStr = System.getProperty("spring.sleuth.function.enabled", "true");
boolean functionalTracingEnabled = Boolean.parseBoolean(functionalTracingEnabledStr);
String functionalTracingEnabledStr = System.getProperty("spring.sleuth.function.enabled");
boolean functionalTracingEnabled =
!StringUtils.hasText(functionalTracingEnabledStr) || Boolean.parseBoolean(functionalTracingEnabledStr);
if (functionalTracingEnabled) {
return this.doApply(input, targetFunction);
}