Ensures that for decorate_hooks we add onLast instrumentation; fixes gh-1900

This commit is contained in:
Marcin Grzejszczak
2021-04-16 12:20:34 +02:00
parent 4ede1ae5b0
commit 9bd6c2e29b

View File

@@ -148,6 +148,7 @@ class HooksRefresher implements ApplicationListener<RefreshScopeRefreshedEvent>
log.trace("Adding queue wrapper instrumentation");
}
HookRegisteringBeanDefinitionRegistryPostProcessor.addQueueWrapper(context);
Hooks.onLastOperator(SLEUTH_TRACE_REACTOR_KEY, ReactorSleuth.scopePassingSpanOperator(this.context));
Schedulers.onScheduleHook(TraceReactorAutoConfiguration.SLEUTH_REACTOR_EXECUTOR_SERVICE_KEY,
ReactorSleuth.scopePassingOnScheduleHook(this.context));
}
@@ -207,6 +208,7 @@ class HookRegisteringBeanDefinitionRegistryPostProcessor implements BeanDefiniti
}
if (property == SleuthReactorProperties.InstrumentationType.DECORATE_QUEUES) {
addQueueWrapper(springContext);
decorateOnLast(ReactorSleuth.scopePassingSpanOperator(springContext));
decorateScheduler(springContext);
}
else {