diff --git a/tracing-attributes/src/lib.rs b/tracing-attributes/src/lib.rs index a8d3aadc64..848e58391a 100644 --- a/tracing-attributes/src/lib.rs +++ b/tracing-attributes/src/lib.rs @@ -121,6 +121,14 @@ use syn::{ /// // ... /// } /// ``` +/// Overriding the generated span's name: +/// ``` +/// # use tracing_attributes::instrument; +/// #[instrument(name = "my_name")] +/// pub fn my_function() { +/// // ... +/// } +/// ``` /// Overriding the generated span's target: /// ``` /// # use tracing_attributes::instrument;