These changes are closing the gap for ProcessInfoContributor that were left out of https://github.com/spring-projects/spring-boot/pull/38371. As it was stated in https://github.com/spring-projects/spring-boot/pull/38371, this information can give runtime insights about the current memory usage and limits selected by the user or JVM ergonomics. If limits not set explicitly, it might not be trivial to know what these values are runtime; especially in (containerized) environments where resource usage can be isolated (for example using control groups). Other than that, these values can indicate if the JVM can resize the heap (stop-the-world).

Its output looks like this:

"process": {
  "pid": 13231,
  "parentPid": 12020,
  "owner": "jonatan",
  "cpus": 16,
  "memory": {
    "heap": {
      "max": 8589934592,
      "commited": 83886080,
      "used": 45954800,
      "init": 536870912
    },
    "nonHeap": {
      "max": -1,
      "commited": 72220672,
      "used": 69441072,
      "init": 7667712
    }
  }
}

Comment From: mhalbritter

Thanks Jonatan!