pub struct HistogramWithLabels<L: Labels> { /* private fields */ }
Expand description

A Prometheus histogram metric, with labels described by the type L.

The type L must implement the Labels trait; see the documentation for that trait for an overview of Prometheus metric labels.

Implementations

Construct and immediately register a new HistogramWithLabels instance.

Construct and immediately register a new HistogramWithLabels instance.

This will use the provided buckets when registering the underlying HistogramVec.

Add a single observation to the histogram with the provided labels.

Return a HistogramTimer to track a duration, using the provided labels.

Observe execution time of a closure, in seconds.

Return accumulated sum of all samples, using the provided labels.

Return count of all samples, using the provided labels.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.