Class JvmGcMetrics

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

@NonNullApi
@NonNullFields
public class JvmGcMetrics
extends java.lang.Object
implements MeterBinder, java.lang.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) and for OpenJ9 garbage collectors (gencon, balanced, opthruput, optavgpause, metronome).

See Also:
GarbageCollectorMXBean
  • Constructor Summary

    Constructors
    Constructor Description
    JvmGcMetrics()  
    JvmGcMetrics​(java.lang.Iterable<Tag> tags)  
  • Method Summary

    Modifier and Type Method Description
    void bindTo​(MeterRegistry registry)  
    void close()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JvmGcMetrics

      public JvmGcMetrics()
    • JvmGcMetrics

      public JvmGcMetrics​(java.lang.Iterable<Tag> tags)
  • Method Details

    • bindTo

      public void bindTo​(MeterRegistry registry)
      Specified by:
      bindTo in interface MeterBinder
    • close

      public void close()
      Specified by:
      close in interface java.lang.AutoCloseable