You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We found a problem where Micrometer tracing propagation stops working when a Feign client is injected to a Spring FactoryBean.
Steps to reproduce:
Have Micrometer tracing enabled
Configure a Feign client
Create a service class that contains the Feign client as dependency
Instantiate the service class through a Spring FactoryBean, not using stereotype annotations or bean declaration. This FactoryBean will need to have a reference to the Feign client, because it will be necessary to instantiate the service class created in step 3
We would expect Micrometer traces to continue working. With the setup explained above it stopped working.
The project contains a single test that passes only when tracing is working properly. The code in master has the test failing, while you can see there is a branch called without-factory-bean that basically removes the FactoryBean and instantiates the service with @Service. The test in this branch works, so tracing is not broken under these conditions.
Please note that this problem occurs when Feign client is a transitive dependency of the Spring FactoryBean as well, we have just injected it directly in the sample code for simplicity.
The text was updated successfully, but these errors were encountered:
Bug description
We found a problem where Micrometer tracing propagation stops working when a Feign client is injected to a Spring FactoryBean.
Steps to reproduce:
We would expect Micrometer traces to continue working. With the setup explained above it stopped working.
Sample
We have created a small sample project reproducing the issue, it can be found here: https://github.com/raul-avila-ph/tracing-issue/
The project contains a single test that passes only when tracing is working properly. The code in
master
has the test failing, while you can see there is a branch calledwithout-factory-bean
that basically removes the FactoryBean and instantiates the service with@Service
. The test in this branch works, so tracing is not broken under these conditions.Please note that this problem occurs when Feign client is a transitive dependency of the Spring FactoryBean as well, we have just injected it directly in the sample code for simplicity.
The text was updated successfully, but these errors were encountered: