I found that after upgrading to Spring Boot 2.6.1 (from 2.4.13) some properties in the info endpoint were gone. These properties are configured in my application.yml like
info:
uiLanguagses: en, de
The Spring Boot 2.6 release notes contain this hint:
Actuator Env InfoContributor Disabled by Default The env info contributor is now disabled by default. To enable it, set management.info.env.enabled to true
By this description I would not have expected that the "info" properties defined manually are affected, because this explicitly refers to "env" info.
However I found that I needed to re-enable the env-info contributor to get my own properties back.
If this is expected, please fix the docs - otherwise fix the bug in the code ;-)
The spring-configuration-metadata.json in spring-boot-actuator-autoconfigure says this about "info" config:
Arbitrary properties to add to the info endpoint
Again, no mention of any "env" related dependency.
Comment From: mbhave
The Environment
that's being talked about here is the Spring Environment. Properties added using application.yml
files end up in the Spring Environment in a property source. In 2.6, we've disabled the info contributor that reads from the Spring Environment by default.
We can update the release notes to make this more obvious.
Comment From: eekboom
Thanks a lot for the quick answer!
Yes, having the release notes more obvious would be great.
A comment in this issue is probably not the best place to say this, but I can't help it at this occasion: I often find when updating Spring Boot that the release notes are not very helpful. Often times I only really understand them after the fact. I start the update by reading the release notes, fix a few things according to the release notes, then build our app, then tests fail, then after quite some time some stackoverflow questions helps me to understand what is wrong at which point I go back to the release notes and see that in some way it was in fact mentioned.
What would really be great in the release notes for each change, were two explicit and clear statements about 1) how to check if I am affected (in this case "if you have any properties under the "info" top level key) and 2) what to do to fix this.
Comment From: mbhave
@eekboom Sorry you weren't able to find the necessary information in the release notes. We try to document everything that users might hit when upgrading from one version to another in the first section of the release notes. Even in this particular situation, we have documented what you could do to bring back info in the EnvironmentEndpoint
. We try to add as many details as possible without making the release notes too verbose. Adding when someone would be affected is a good suggestion. Thanks for the feedback!
Comment From: mbhave
Wiki update is here.
Comment From: izeye
If you have any properties starting with
info
and would like them to appear them in theEnvironmentEndpoint
, setmanagement.info.env.enabled
totrue
Looking at the wiki entry, EnvironmentEndpoint
seems to be a typo of InfoEndpoint
.
Comment From: snicoll
Good catch @izeye, I've fixed that section of the wiki.