Class DefaultExports

java.lang.Object
io.prometheus.client.hotspot.DefaultExports

public class DefaultExports extends Object
Registers the default Hotspot collectors.

This is intended to avoid users having to add in new registrations every time a new exporter is added.

Example usage:

 
   DefaultExports.initialize();
 
 
  • Field Details

    • initialized

      private static boolean initialized
  • Constructor Details

    • DefaultExports

      public DefaultExports()
  • Method Details

    • initialize

      public static void initialize()
      Register the default Hotspot collectors with the default registry. It is safe to call this method multiple times, as this will only register the collectors once.
    • register

      public static void register(CollectorRegistry registry)
      Register the default Hotspot collectors with the given registry.