have any metric about jvm GC Pause?
qhyuTT opened this issue · 3 comments
qhyuTT commented
qhyuTT commented
version:jmx_prometheus_javaagent-0.19.0.jar
dhoard commented
@qhyuTT The exporter can only expose MBean attributes.
Looking at the GarbageCollectorMXBean
(https://docs.oracle.com/javase/8/docs/api/java/lang/management/GarbageCollectorMXBean.html) I don't see any attributes that represent GC pause time.
There is an internal MBean, sun.management.HotspotRuntimeMBean
that provides getTotalSafepointTime()
to get the total JVM GC pause time but doesn't provide per GC pause time. Considering it's a sun.
package, it may or may not work.
qhyuTT commented
yeah, Using internal APIs like sun.management.HotspotRuntimeMBean carries some risk as they might change in future Java versions. thans for for reply.