Struct prometheus_utils::IntCounterWithLabels [−][src]
pub struct IntCounterWithLabels<L: Labels> { /* fields omitted */ }
Expand description
A Prometheus integer counter 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 IntCounterWithLabels
instance.
Increment the metric by 1
, using the provided labels
for the event.
Increment the metric by v
, using the provided labels
for the event.
Creates a guard value that will increment the metric by 1
, using the provided labels
,
once dropped.
Prior to dropping, the labels can be altered using DeferredAddWithLabels::with_labels
.
Creates a guard value that will increment the metric by v
, using the provided labels
,
once dropped.
Prior to dropping, the labels can be altered using DeferredAddWithLabels::with_labels
.
Auto Trait Implementations
impl<L> !RefUnwindSafe for IntCounterWithLabels<L>
impl<L> Send for IntCounterWithLabels<L> where
L: Send,
impl<L> Sync for IntCounterWithLabels<L> where
L: Sync,
impl<L> Unpin for IntCounterWithLabels<L> where
L: Unpin,
impl<L> !UnwindSafe for IntCounterWithLabels<L>