Type Definition prometheus::HistogramVec

source ·
pub type HistogramVec = MetricVec<HistogramVecBuilder>;
Expand description

A Collector that bundles a set of Histograms that all share the same Desc, but have different values for their variable labels. This is used if you want to count the same thing partitioned by various dimensions (e.g. HTTP request latencies, partitioned by status code and method).

Implementations§

source§

impl HistogramVec

source

pub fn new(opts: HistogramOpts, label_names: &[&str]) -> Result<HistogramVec>

Create a new HistogramVec based on the provided HistogramOpts and partitioned by the given label names. At least one label name must be provided.

source

pub fn local(&self) -> LocalHistogramVec

Return a LocalHistogramVec for single thread usage.