Class GaugeUtils


  • public final class GaugeUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static io.prometheus.client.Collector createCustomGauge​(java.lang.String name, java.lang.String help, java.util.function.Supplier<java.lang.Double> supplier)  
      static io.prometheus.client.Collector createCustomGauge​(java.lang.String name, java.lang.String help, java.util.Map<java.lang.String,​java.lang.String> labels, java.util.function.Supplier<java.lang.Double> supplier)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createCustomGauge

        public static io.prometheus.client.Collector createCustomGauge​(java.lang.String name,
                                                                       java.lang.String help,
                                                                       java.util.function.Supplier<java.lang.Double> supplier)
        Parameters:
        name - name of the Gauge
        help - Humain friendly description of the Gauge
        supplier - a side-effect-free / non-blocking function returning the gauge value on demand
        Returns:
        A custom gauge collector
      • createCustomGauge

        public static io.prometheus.client.Collector createCustomGauge​(java.lang.String name,
                                                                       java.lang.String help,
                                                                       java.util.Map<java.lang.String,​java.lang.String> labels,
                                                                       java.util.function.Supplier<java.lang.Double> supplier)
        Parameters:
        name - name of the Gauge
        help - Humain friendly description of the Gauge
        labels - key-value label pairs
        supplier - a side-effect-free / non-blocking function returning the gauge value on demand
        Returns:
        A custom gauge collector