Package fr.gouv.vitam.common.metrics
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
-
-
Constructor Summary
Constructors Constructor Description DynamicGauge(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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<io.prometheus.client.Collector.MetricFamilySamples>
collect()
java.util.List<io.prometheus.client.Collector.MetricFamilySamples>
describe()
-
-
-
Constructor Detail
-
DynamicGauge
public DynamicGauge(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
-
-
Method Detail
-
describe
public java.util.List<io.prometheus.client.Collector.MetricFamilySamples> describe()
- Specified by:
describe
in interfaceio.prometheus.client.Collector.Describable
-
collect
public java.util.List<io.prometheus.client.Collector.MetricFamilySamples> collect()
- Specified by:
collect
in classio.prometheus.client.Collector
-
-