-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Environment Report when running with -Ddebug=true #11278
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
I'm worried this might be a bit overwhelming, but it could be a good opt-in setting. |
Agreed, and when I'm facing a property issue its generally pretty obvious so opting in would be simple. There is a certain beauty to having all debug info displayed via a single property, but equally important to avoid information overload. |
@twicksell would #10030 a way to mitigate this problem? |
I think it would solve it for some cases, but still miss others. Imagine an app with a startup failure around not being able to connect to the database. I might have a different jdbc url configured for each profile, as well as override values coming out of a remote config server. All of the values could be considered "valid", but I would still have no way of verifying which value was being selected at startup time. It looks like #10030 would be a useful shortcut to diagnosing one type of problem, but for what I'm experiencing I believe I'd still need the full output of the environment. We should also consider the case where property reading is not happening in |
@philwebb @snicoll Where would be the right place to implement such an enhancement? The similiar functionality for the autoconfiguration report is part of spring-boot-autoconfigure. Would it be suitable to put it in org.springframework.boot.logging? But unfortunately the functionality would have a strong overlap with EnvironmentEndpoint |
@julmuell thanks for the delay. I don't know really but reviewing this issue made me wonder why @twicksell was mentioning the actuator. The auto-configuration report is a "core" (i.e. non actuator feature) and adding the environment as an extra piece in the logs would also be actuator-independent.
Adding the environment in there would bring a few challenges:
If we have an opt-in flag, that could be a completely separate concern (and therefore could be a proper answer for those two items). I just don't know how to name that. If you want to spike on it based on this feedback, I am happy to guide you (we're on Gitter as well). |
Similar to the autoconfig report, it would be very helpful to print the output of the Environment actuator when the debug flag is set.
This would help to debug failures related to invalid or missing properties, particularly in a setup where properties come from dynamic sources such as the Spring Cloud Config Server.
The text was updated successfully, but these errors were encountered: