Skip to content

Commit

Permalink
docs: add docs for instrument(name) (#897)
Browse files Browse the repository at this point in the history
## Motivation

Not found in documentation how to change generated span name name, only in
sources, then i found issue #725  

## Solution

Documentation added
  • Loading branch information
anton-dutov authored Aug 7, 2020
1 parent 63c0f31 commit ed28c1f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tracing-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ed28c1f

Please sign in to comment.