instrument_trace

Attribute Macro instrument_trace 

Source
#[instrument_trace]
Expand description

Enables trace-level instrumentation for the decorated function.

This attribute macro wraps the function with #[::tracing::instrument(level = "trace", skip_all)], enabling automatic tracing instrumentation at the trace level with all arguments excluded from span fields.

§Arguments

  • attr - Additional tracing instrument parameters (optional): target, name, skip, fields, etc.
  • item - The TokenStream representing the function to be instrumented.

§Returns

Returns the expanded TokenStream with tracing instrumentation applied.

§Examples

use tracing;
use instrument_level::*;

#[instrument_trace]
async fn test(x: i32, y: i32) -> i32 {
    x + y
}