Class JvmGcMetrics

java.lang.Object
io.micrometer.core.instrument.binder.jvm.JvmGcMetrics
All Implemented Interfaces:
MeterBinder, AutoCloseable

@NonNullApi @NonNullFields public class JvmGcMetrics extends Object implements MeterBinder, AutoCloseable
Record metrics that report a number of statistics related to garbage collection emanating from the MXBean and also adds information about GC causes.

This provides metrics for OpenJDK garbage collectors (serial, parallel, G1, Shenandoah, ZGC), OpenJ9 garbage collectors (gencon, balanced, opthruput, optavgpause, metronome) and for Azul Prime's (formerly Zing) C4 GC (formerly GPGC).

WARNING: Older versions of Azul Prime (Zing) did not report timing information about pauses and cycles correctly (duration of GC pauses and duration of the concurrent part of the GC which runs in parallel to application threads and is not stopping the application). See the release notes and JDK-8265136. If you want better accuracy, please make sure that you use a newer version and the new metrics are enabled.

See Also:
  • Constructor Details

    • JvmGcMetrics

      public JvmGcMetrics()
    • JvmGcMetrics

      public JvmGcMetrics(Iterable<Tag> tags)
  • Method Details