prometheus_client library

A library containing the core elements of the Prometheus client, like the CollectorRegistry and different types of metrics like Counter, Gauge and Histogram.

Classes

Collector
A Collector is registered at a CollectorRegistry and scraped for metrics. A Collector can be registered at multiple CollectorRegistrys.
CollectorRegistry
A CollectorRegistry is used to manage Collectors. Own CollectorRegistry instances can be created, but a defaultRegistry is also provided.
Counter
Counter is a monotonically increasing counter.
CounterChild
Defines a CounterChild of a Counter with assigned labelValues.
Gauge
A Gauge represents a value that can go up and down.
GaugeChild
Defines a GaugeChild of a Gauge with assigned labelValues.
Histogram
Histogram allows aggregatable distributions of events, such as request latencies.
HistogramChild
Defines a HistogramChild of a Histogram with assigned labelValues.
MetricFamilySamples
A MetricFamilySamples groups all samples of a metric family.
Quantile
Defines a quantile.
Sample
A Sample represents a sampled value of a metric.
Summary
Similar to a Histogram, a Summary samples observations (usually things like request durations and response sizes). While it also provides a total count of observations and a sum of all observed values, it calculates configurable quantiles over a sliding time window.
SummaryChild
Defines a SummaryChild of a Summary with assigned labelValues.

Enums

MetricType
Defines the different metric type supported by Prometheus.

Typedefs

Collect<T extends Collector> = FutureOr<void> Function(T collector)
A callback used to aggregate the current sample values.