Skip to main content

Module core

Module core 

Source
Expand description

Mirrors prometheus::core and provides GenericGauge/GenericCounter wrappers compatible with prometheus’s own generic types.

crate::IntGauge, crate::Gauge, crate::IntCounter, and crate::Counter are type aliases for concrete instantiations of these types, so Option<IntGauge> and Option<GenericGauge<AtomicI64>> are the same type.

Structs§

AtomicF64
A atomic float.
AtomicI64
A atomic signed integer.
AtomicU64
A atomic unsigned integer.
Desc
The descriptor used by every Prometheus Metric. It is essentially the immutable meta-data of a metric. The normal metric implementations included in this package manage their Desc under the hood.
GenericCounter
GenericCounterVec
GenericGauge
GenericGaugeVec
Histogram
HistogramTimer
HistogramVec

Traits§

Atomic
An interface for atomics. Used to generically model float metrics and integer metrics, i.e. Counter and IntCounter.
Collector
An interface for collecting metrics.
Describer
An interface for describing the immutable meta-data of a Metric.
Metric
An interface models a single sample value with its meta data being exported to Prometheus.
MetricVecBuilder
An interface for building a metric vector.
Number
An interface for numbers. Used to generically model float metrics and integer metrics, i.e. Counter and IntCounter.