macro_rules! spawn_metrics {
($ctx:ident) => { ... };
($label:expr, @make $ctx:ident) => { ... };
}Expand description
Prepare metrics for a spawned task.
Returns a (Label, MetricHandle) pair for tracking spawned tasks.
The Label identifies the task in the metrics registry and the
MetricHandle immediately increments the tasks_running gauge for that
label. Call MetricHandle::finish once the task completes to decrement the
gauge.