Trait iota_metrics::MonitoredFutureExt

source ·
pub trait MonitoredFutureExt: Future + Sized {
    // Required method
    fn in_monitored_scope(
        self,
        name: &'static str,
    ) -> MonitoredScopeFuture<Self> ;
}
Expand description

A trait extension for Future to allow monitoring the execution of the future within a specific scope. Provides the in_monitored_scope method to wrap the future in a MonitoredScopeFuture, which tracks the future’s execution using a MonitoredScopeGuard for monitoring purposes.

Required Methods§

source

fn in_monitored_scope(self, name: &'static str) -> MonitoredScopeFuture<Self>

Wraps the current future in a MonitoredScopeFuture that is associated with a specific monitored scope name. The scope helps track the execution of the future for performance analysis and metrics collection.

Object Safety§

This trait is not object safe.

Implementors§