Package fr.gouv.vitam.common.metrics
Class GaugeUtils
- java.lang.Object
-
- fr.gouv.vitam.common.metrics.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.List<java.lang.String> labelNames, java.util.function.Supplier<java.util.Map<java.util.List<java.lang.String>,java.lang.Double>> metricsSupplier)
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)
Create a dynamic Gauge with fixed label keys/values
-
-
-
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 Gaugehelp
- Humain friendly description of the Gaugesupplier
- 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)
Create a dynamic Gauge with fixed label keys/values- Parameters:
name
- name of the Gaugehelp
- Humain friendly description of the Gaugelabels
- key-value label pairssupplier
- 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.List<java.lang.String> labelNames, java.util.function.Supplier<java.util.Map<java.util.List<java.lang.String>,java.lang.Double>> metricsSupplier)
- Parameters:
name
- name of the Gaugehelp
- Humain friendly description of the GaugelabelNames
- label namesmetricsSupplier
- a side-effect-free / non-blocking function returning the gauge value per label values- Returns:
- A custom gauge collector
-
-