prometheus/jmx_exporter

have any metric about jvm GC Pause?

qhyuTT opened this issue · 3 comments

image

There is a blank area in my monitor, and it returns to normal after 1 minute.i guess it maybe caused by stop the world,but i can't find any metric about metric.

version:jmx_prometheus_javaagent-0.19.0.jar

@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.

yeah, Using internal APIs like sun.management.HotspotRuntimeMBean carries some risk as they might change in future Java versions. thans for for reply.