Fixed the decorate queues reactor option; fixes gh-1735

This commit is contained in:
Marcin Grzejszczak
2021-04-19 16:59:21 +02:00
parent bd47e12614
commit 0242859cc6
2 changed files with 4 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ public class SleuthReactorProperties {
* the feature set of {@link SleuthReactorProperties#decorateOnEach} with the least
* impact on the performance.
*/
private boolean decorateQueues = true;
private boolean decorateQueues = false;
/**
* When true decorates on each operator, will be less performing, but logging will

View File

@@ -105,6 +105,7 @@ public class TraceReactorAutoConfiguration {
log.trace("Resetting queue wrapper instrumentation");
}
Hooks.removeQueueWrapper(SLEUTH_TRACE_REACTOR_KEY);
Hooks.resetOnLastOperator(SLEUTH_TRACE_REACTOR_KEY);
}
if (reactorProperties.isDecorateOnEach()) {
if (log.isTraceEnabled()) {
@@ -181,6 +182,8 @@ class HooksRefresher implements ApplicationListener<RefreshScopeRefreshedEvent>
log.trace("Adding queue wrapper instrumentation");
}
HookRegisteringBeanDefinitionRegistryPostProcessor.addQueueWrapper(context);
Hooks.onLastOperator(SLEUTH_TRACE_REACTOR_KEY,
scopePassingSpanOperator(this.context));
}
else if (this.reactorProperties.isDecorateOnEach()) {
if (log.isTraceEnabled()) {