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
-
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
-
Method Summary
Methods inherited from class io.prometheus.client.Collector
checkMetricLabelName, checkMetricName, collect, doubleToGoString, register, register, sanitizeMetricName
-
Constructor Details
-
DynamicGauge
public DynamicGauge(String name, String help, List<String> labelNames, Supplier<Map<List<String>, 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 Details
-
describe
- Specified by:
describe
in interfaceio.prometheus.client.Collector.Describable
-
collect
- Specified by:
collect
in classio.prometheus.client.Collector
-