Class DynamicGauge

java.lang.Object
io.prometheus.client.Collector
fr.gouv.vitam.common.metrics.DynamicGauge
All Implemented Interfaces:
io.prometheus.client.Collector.Describable

public class DynamicGauge extends io.prometheus.client.Collector implements io.prometheus.client.Collector.Describable
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.prometheus.client.Collector

    io.prometheus.client.Collector.Describable, io.prometheus.client.Collector.MetricFamilySamples, io.prometheus.client.Collector.Type
  • Field Summary

    Fields inherited from class io.prometheus.client.Collector

    MILLISECONDS_PER_SECOND, NANOSECONDS_PER_SECOND
  • Constructor Summary

    Constructors
    Constructor
    Description
    DynamicGauge(String name, String help, List<String> labelNames, Supplier<Map<List<String>,Double>> metricsSupplier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<io.prometheus.client.Collector.MetricFamilySamples>
     
    List<io.prometheus.client.Collector.MetricFamilySamples>
     

    Methods inherited from class io.prometheus.client.Collector

    checkMetricLabelName, checkMetricName, collect, doubleToGoString, register, register, sanitizeMetricName

    Methods inherited from class java.lang.Object

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

    • DynamicGauge

      public DynamicGauge(String name, String help, List<String> labelNames, Supplier<Map<List<String>,Double>> metricsSupplier)
      Parameters:
      name - name of the Gauge
      help - Humain friendly description of the Gauge
      labelNames - label names
      metricsSupplier - a side-effect-free / non-blocking function returning the gauge value per label values
  • Method Details

    • describe

      public List<io.prometheus.client.Collector.MetricFamilySamples> describe()
      Specified by:
      describe in interface io.prometheus.client.Collector.Describable
    • collect

      public List<io.prometheus.client.Collector.MetricFamilySamples> collect()
      Specified by:
      collect in class io.prometheus.client.Collector