SamplerGaugeCollector
Parameters
the metric name. As in the Prometheus Java client 1.x, any non-empty UTF-8 string is accepted; the exposition formats escape characters outside the legacy [a-zA-Z_:][a-zA-Z0-9_:]* set.
the help/description text for the metric.
the label names for the metric. Defaults to empty.
the label values corresponding to labelNames. Defaults to empty.
the registry to register with. Defaults to PrometheusRegistry.defaultRegistry.
a lambda that returns the current gauge value as a Double. If it throws, the failure is logged at WARN and the gauge reports NaN for that scrape instead of failing the whole scrape.
Creates an unlabelled gauge registered with PrometheusRegistry.defaultRegistry.
Creates a gauge with the given labels, registered with PrometheusRegistry.defaultRegistry.