Function iota_metrics::with_new_server_timing

source ยท
pub async fn with_new_server_timing<T>(
    fut: impl Future<Output = T> + Send + 'static,
) -> T
Expand description

Create a new task-local ServerTiming context and run the provided future within it. Should be used at the top-most level of a request handler. Can be added to an axum router as a layer by using iota_service::server_timing_middleware.