macro_rules! span_async_named_dyn {
($name:expr, $async_block:expr) => { ... };
}Expand description
Instruments an async block with a named span whose name is built at runtime.
The future owns the name: pass a String or Arc<str> to keep the future 'static.
ยงExamples
use micromegas_tracing::prelude::*;
let id = 7;
let result = span_async_named_dyn!(format!("query {id}"), async {
42
}).await;