spring-cloud/spring-cloud-sleuth

TraceReactorAutoConfiguration.HooksRefresher improper queue decoration

kkondratov opened this issue · 0 comments

Describe the bug
TraceReactorConfiguration configures Hooks for reactor based on the spring.sleuth.reactor.instrumentation-type property.

However on RefreshScopeRefreshedEvent the HooksRefresher bean decorates reactor with both DECORATE_QUEUES and DECORATE_ON_EACH when the spring.sleuth.reactor.instrumentation-type is set to DECORATE_QUEUES.
The switch statement is missing a break when the DECORATE_QUEUES is done.

See:

This causes Applications that have DECORATE_QUEUES set and get a RefreshScopeRefreshedEvent to spike in cpu usage due hooks added from both DECORATE_QUEUES and DECORATE_QUEUES.