Skip to main content

Module deregister_on_drop

Module deregister_on_drop 

Source
Available on crate feature metrics only.
Expand description

Labeled metrics that stay registered while any handle for their labels is alive.

Each DeleteOnDropMetric obtained from a vector removes its labels when it drops, even while another handle for the same labels, obtained separately, is still recording. The survivor then records into a series that is no longer exported. This happens when every timely worker creates a metric but only one keeps using it, and when a restarted dataflow creates its metrics before the previous incarnation drops its own.

DeregisterOnDropVec counts handles per label set across all calls, so the series is removed only when the last handle for its labels drops.

Structsยง

DeregisterOnDropMetric
A labeled metric that stays registered while any handle for its labels is alive.
DeregisterOnDropVec
A metric vector whose handles share one registration per label set.
Registration ๐Ÿ”’
Removes a label set from its vector when the last handle for it drops.

Type Aliasesยง

DeregisterOnDropCounter
A GenericCounter that stays registered while any handle for its labels is alive.
DeregisterOnDropGauge
A GenericGauge that stays registered while any handle for its labels is alive.
DeregisterOnDropHistogram
A Histogram that stays registered while any handle for its labels is alive.
Registrations ๐Ÿ”’
The live registration of each label set, keyed by label values.