Is there any way to get JVM GC pause time metrics in the prometheus format using JMX exporter or any other way? I have used JMX exporter and tried to export the metrics using the following mbean
java.lang:name=G1 Young Generation,type=GarbageCollector
But that one only gives the collection count and total collection time metrics. Not the GC Pause time metrics.
com.sun.management.GarbageCollectorMXBean, you might be able to obtain theGcInfowhich can also contain GC specific attributes. I think this would be equivalent tocom.sun.management:type=GarbageCollectoror something like that (I don't know much about JMX).com.sun.managementor the one fromjava.lang.management? I think only the former hasGcInfo.