-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
'management.tracing.enabled=false' does not disable tracing propagation in Spring Boot 3.2.0 #38625
Comments
As we restructured the bean arrangement in #35354, now only the reporting beans are disabled when If you want to disable propagation or tracing, please remove the dependencies from the classpath. Generally in Boot, we don't have |
In that case, could you at least update the documentation for the property? |
Sure, i've opened #38626 for that. |
Too bad that there won't be a property to disable this. In our experience providing a Spring Boot based framework to our company, having such properties has been invaluable to quickly help teams progress. If only to allow the option to quickly disable functionality in case of troubleshooting or production issues. |
You won't find a lot of |
They might not all have the ability to disable whole feature sets, but the properties documentation shows 152 |
You're right, I should have said "You won't find a lot of enabled properties in Spring Boot that are detectable via a different signal". These properties you linked to enable/disable features which are not detectable via other means. |
As my final remark. The main reason for the request is the ease of use. I'm not just asking for myself, but also for the over 600 engineers in our company who use our own Spring Boot based framework daily. But if this is not a good enough reason for you, I'll leave it at that. |
Then we need to build different artifacts for different deployments, I'd like build once and run for all by disable/enable feature flag. |
You can also disable auto-configuration with a property, see here. |
It's not very handy either since |
All auto-configurations work like that, I don't see why the auto-configuration for tracing should have a feature flag while the others don't. |
I'm discussing enable/disable feature by including dependency. But it's more desired for tracing, It's very common that an application need tracing for production deployment but not needed for SIT/UAT deployment. |
Okay. If you have that use case, please open an issue explaining why you need an |
Hey @lkleeven, we talked about that tracing disabling in our meeting and decided to make that |
management.tracing.enabled=false
does not disable tracing propagation in Spring Boot 3.2.0
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 settingmanagement.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 returntrue
but now returnsfalse
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 thetraceparent
header has been set. If so it returnsfalse
because we expect it not to be set, otherwise it returnstrue
. In the applications properties themanagement.tracing.enabled
property is set tofalse
. Extra logging is present to help in debugging.The text was updated successfully, but these errors were encountered: