fuchsia_trace

Macro trace_future_args

Source
macro_rules! trace_future_args {
    ($category:expr, $name:expr $(, $key:expr => $val:expr)*) => { ... };
    ($category:expr, $name:expr, $flow_id:expr $(, $key:expr => $val:expr)*) => { ... };
}
Expand description

Macro for constructing TraceFutureArgs. The trace arguments won’t be constructed if the category is not enabled. If the category becomes enabled while the TraceFuture is still alive then the duration events will still be written but without the trace arguments.

Example:

async move {
    ....
}.trace(trace_future_args!(c"category", c"name", "x" => 5, "y" => 10)).await;