Skip to content

Commit

Permalink
attributes: add skip_all (tokio-rs#1548)
Browse files Browse the repository at this point in the history
Using `#[instrument(skip_all)]` is equivalent to `#[instrument(skip(foo,
bar..))]` for all the parameters.
  • Loading branch information
jsgf authored and kaffarell committed May 22, 2024
1 parent d72455d commit 20500bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tracing-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ mod expand;
/// }
/// ```
///
/// This can be used in conjunction with `skip` to record only some fields of a
/// struct:
/// This can be used in conjunction with `skip` or `skip_all` to record only
/// some fields of a struct:
/// ```
/// # use tracing_attributes::instrument;
/// // Remember the struct with the very large `data` field from the earlier
Expand Down
1 change: 1 addition & 0 deletions tracing-attributes/tests/instrument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ fn skip() {
with_default(collector, || {
my_fn(2, UnDebug(0), UnDebug(1));
my_fn(3, UnDebug(0), UnDebug(1));
my_fn2(2, UnDebug(0), UnDebug(1));
});

handle.assert_finished();
Expand Down

0 comments on commit 20500bc

Please sign in to comment.