Description
Before Spring Boot 3.2.0 setting the management.tracing.enabled
property to false would also disable the underlying tracing propagation. However with Spring Boot 3.2.0 things have changed with regards to observability. As far as I understand this should have only affected how to test observability.
However, if I now run an application with tracing support and set the management.tracing.enabled
to false I can see that the application still propagates tracing headers (or starts a new trace). I expected that setting management.tracing.enabled
to false would also disable tracing propagation (and starting new traces).
I've reproduced the problem in this minimal Spring Boot project. The project has an included unit test that now fails. You can run it with .mvnw clean verify
. Alternatively, you can run the application and do a call to the /demo
endpoint which should return true
but now returns false
due to the suspected bug.
I've based my reproduction on a simple premise where you can call the /demo
endpoint, which will then call another endpoint. That one checks if the traceparent
header has been set. If so it returns false
because we expect it not to be set, otherwise it returns true
. In the applications properties the management.tracing.enabled
property is set to false
. Extra logging is present to help in debugging.