Package fr.gouv.vitam.common.metrics

# Class GaugeUtils

java.lang.Object
fr.gouv.vitam.common.metrics.GaugeUtils

public final class GaugeUtils extends Object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static io.prometheus.client.Collector`
  `createCustomGauge(String name, String help, Supplier<Double> supplier)`
  `static io.prometheus.client.Collector`
  `createCustomGauge(String name, String help, List<String> labelNames, Supplier<Map<List<String>,Double>> metricsSupplier)`
  `static io.prometheus.client.Collector`
  `createCustomGauge(String name, String help, Map<String,String> labels, Supplier<Double> supplier)`
  Create a dynamic Gauge with fixed label keys/values

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### createCustomGauge

    public static io.prometheus.client.Collector createCustomGauge(String name, String help, Supplier<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(String name, String help, Map<String,String> labels, Supplier<Double> supplier)
    Create a dynamic Gauge with fixed label keys/values
    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

  - ### createCustomGauge

    public static io.prometheus.client.Collector createCustomGauge(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
    Returns:
      A custom gauge collector