java.lang.Object
io.opentelemetry.instrumentation.runtimetelemetry.internal.GarbageCollector

public class GarbageCollector extends Object
Registers instruments that generate metrics about JVM garbage collection. The metrics generated by this class follow the stable JVM metrics semantic conventions.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Field Details

    • GC_DURATION_BUCKETS

      public static final List<Double> GC_DURATION_BUCKETS
  • Constructor Details

    • GarbageCollector

      protected GarbageCollector()
  • Method Details

    • registerObservers

      public static List<AutoCloseable> registerObservers(io.opentelemetry.api.metrics.Meter meter, boolean captureGcCause)
      Register observers for java runtime memory metrics.
    • registerObservers

      public static List<AutoCloseable> registerObservers(io.opentelemetry.api.metrics.Meter meter, List<GarbageCollectorMXBean> gcBeans, Function<Notification,com.sun.management.GarbageCollectionNotificationInfo> notificationInfoExtractor, boolean captureGcCause)