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 gauge reports NaN for that scrape instead of failing the whole scrape. The failure is logged with its stack trace at WARN when it follows a success or differs from the previous one (by the class and message of the exception and its causes), and at DEBUG while it repeats; the next success is logged at INFO.
Creates an unlabelled gauge registered with PrometheusRegistry.defaultRegistry.
Creates a gauge with the given labels, registered with PrometheusRegistry.defaultRegistry.