Hello list With deprecation of OperatingSystem#SystemCpuLoad in favor of OperatingSystem#CpuLoad [1] an issue raised with generic tools that query all MBean attributes. Querying CPU usage is not side-effect-free: the immediate subsequent query for CPU load will often return a skewed value (on Linux at least, haven't checked others)[2]. This results in exported data where either new or deprecated MBean value is wrong and misleading.
There are many tools and libraries that generically export JMX metrics, so I think this should be addressed somehow. Maybe we could add a property in MBeanAttributeInfo which would mark the attribute as deprecated? These tools could then skip such metrics. [1] https://docs.oracle.com/en/java/javase/14/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getSystemCpuLoad() [2] https://medium.com/@milan.mimica/the-java-cpu-usage-observer-effect-18808b18323f -- Milan Mimica