#[cfg(not(any(
commonware_stability_GAMMA,
commonware_stability_DELTA,
commonware_stability_EPSILON,
commonware_stability_RESERVED
)))] #[macro_export]
macro_rules! spawn_metrics {
($ctx:ident) => {
$crate::spawn_metrics!(
$crate::telemetry::metrics::task::Label::task(
$ctx.name.clone(),
$ctx.execution,
),
@make $ctx
)
};
($label:expr, @make $ctx:ident) => {{
let label = $label;
let metrics = $ctx.metrics();
metrics.tasks_spawned.get_or_create(&label).inc();
let metric = $crate::utils::MetricHandle::new(
metrics.tasks_running.get_or_create(&label).clone(),
);
(label, metric)
}};
}