This InfoContributor
adds Operating System related details to actuator's info endpoint as part of the Enhanced Observability effort: https://github.com/spring-projects/spring-boot/issues/25476
When configured, it looks like this:
{
"os": {
"name": "Mac OS X",
"version": "10.16",
"arch": "x86_64"
}
}
or
{
"os": {
"name": "Linux",
"version": "5.4.0-1051-gke",
"arch": "amd64"
}
}
I'm thinking if we should call out in the docs that the version is the os.version
Java system property and because certain Operating Systems use multiple versions for the same thing, on these Operating Systems, the version string can be different on different JVMs (but on the same OS) if the JVM implementations use different version sources.
E.g.: on my Mac, Java 8 says 10.16
while Java 17 says 11.5
. Both mean the same thing but 10.16 is the "backward-compatible" version from the OS X era while 11.5 is the new version from the macOS times. As far as I saw, Linux does not have such problems (did not try on Windows). :)