Skip to content

Commit d8fec47

Browse files
lfranckehawkw
authored andcommitted
tracing: fix a typo and adds a note about the supported field syntax (tokio-rs#1232)
The `instrument` macro does not explain the syntax that can be used and the main tracing docs only say that this syntax is valid for `span` and `event` macros. Co-authored-by: Eliza Weisman <eliza@buoyant.io>
1 parent cb5a4de commit d8fec47

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tracing-attributes/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ mod expand;
113113
/// for each field. The name of the field must be a single valid Rust
114114
/// identifier, nested (dotted) field names are not supported.
115115
///
116+
/// This supports the same [field syntax] as the `span!` and `event!` macros.
117+
///
116118
/// Note that overlap between the names of fields and (non-skipped) arguments
117119
/// will result in a compile error.
118120
///

tracing/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@
208208
//!
209209
//! ## Using the Macros
210210
//!
211-
//! The [`span!`] and [`event!`] macros use fairly similar syntax, with some
212-
//! exceptions.
211+
//! The [`span!`] and [`event!`] macros as well as the `#[instrument]` attribute
212+
//! use fairly similar syntax, with some exceptions.
213213
//!
214214
//! ### Configuring Attributes
215215
//!

0 commit comments

Comments
 (0)