-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Migration form 3.1.5 to 3.2.0 : "Default" Tracer is not provided in test anymore #38568
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
Comments
Thanks for the report. This change in behavior is a side-effect of #35354. For what were you using the |
Hello Wilkinsona, i'm testing the behavior of an "Exception Handler" of my Rest service. I'm adding the trace information (traceId / SpanId ) of the request in the Response during the exception handling |
We are also running into this problem, we rely on tracer to be present during tests, our tests fail since Spring Boot 3.2.0 |
We discussed this today. We think we may be able to modify |
This auto-configuration ensures, if Micrometer Tracing is on the classpath, that there is always a tracer. It backs off if there is already a tracer, for example contributed by the Brave or the Otel auto-configurations, which are run before. See gh-38568
Another thing I've changed: if Micrometer Tracing is on the classpath, there's now always a |
I had an issue during the migration of a project from Spring Boot version 3.1.5 to 3.2.0.
In 3.1.5 the Spring boot test suite was providing a "default" tracer. I was not able to find the configuration who was adding this tracer. (May be this one ?
spring-boot/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/actuate/observability/ObservabilityContextCustomizerFactory.java
Line 108 in 07d8c99
In Spring Boot 3.2.0, no default Tracer is configured. Is this a regression or a wanted behavior ? Maybe this change need to be documented if it's a wanted behavior ?
I've fixed my project by adding an tracer implementation (micrometer-tracing-bridge-otel in my case) and by migrating from the
@WebMvcTest
annotation to the@SpringBootTest
annotation +@AutoConfigureMockMvc
annotationThe text was updated successfully, but these errors were encountered: