-
Notifications
You must be signed in to change notification settings - Fork 41.2k
WebClient- and RestTemplate-based Zipkin senders can cause a bean dependency cycle #32528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebClient- and RestTemplate-based Zipkin senders can cause a bean dependency cycle #32528
Conversation
f21878e
to
0fbb1cc
Compare
without this change we're using a RestTemplate and WebClient beans for sending out spans. The same beans require Zipkin senders to be pre-configured through the tracing handlers. That's a cycle. with this change we're breaking the cycle by not creating RT and WC as beans but we're creating them via new and we're providing customizers to allow RT and WC customization
0fbb1cc
to
3f129ad
Compare
Cycle:
|
As far as I can tell the cycle does not occur at the moment when using |
Previously, RestTemplateBuilder and WebClient.Builder beans were used to create the HTTP client for sending out spans. Those same beans are also instrumented for observability which results in a cycle. This commit breaks the cycle by not using the application-web builders to create the RestTemplate and WebClient's used by the Zipkin senders. Instead, builders are created inline, with new callbacks being introduced to allow the user to customize these Zipkin-specific builders. See gh-32528
without this change we're using a RestTemplate and WebClient beans for sending out spans. The same beans require Zipkin senders to be pre-configured through the tracing handlers. That's a cycle.
with this change we're breaking the cycle by not creating RT and WC as beans but we're creating them via new and we're providing customizers to allow RT and WC customization