Skip to content

Commit

Permalink
attributes: prepare to release v0.1.24
Browse files Browse the repository at this point in the history
# 0.1.24 (April 24th, 2023)

This release of `tracing-attributes` adds support for passing an
optional `level` to the `err` and `ret` arguments to `#[instrument]`,
allowing the level of the generated return-value event to be overridden.
For example,

```rust
#[instrument(err(level = "info"))]
fn my_great_function() -> Result<(), &'static str> {
    // ...
}
```

will emit an `INFO`-level event if the function returns an `Err`.

In addition, this release updates the [`syn`] dependency to v2.x.x.

### Added

- `level` argument to `err` and `ret` to override the level of the
  generated return value event (#2335)
- Improved compiler error message when `#[instrument]` is added to a
  `const fn` (#2418)

### Changed

- Updated `syn` dependency to 2.0 (#2516)

### Fixed

- Fix `clippy::unreachable` warnings in `#[instrument]`-generated code
  (#2356)
- Removed unused "visit" feature flag from `syn` dependency (#2530)

### Documented

- Documented default level for `err` (#2433)
- Improved documentation for levels in `#[instrument]` (#2350)

Thanks to @nitnelave, @jsgf, @Abhicodes-crypto, @LukeMathWalker,
@andrewpollack, @quad, @klensy, @davidpdrsn, and @dbidwell94 for
contributign to this release!

[`syn`]: https://crates.io/crates/syn
  • Loading branch information
hawkw committed Apr 24, 2023
1 parent 0114ec1 commit f7f0d9c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
51 changes: 51 additions & 0 deletions tracing-attributes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,61 @@
# 0.1.24 (April 24th, 2023)

This release of `tracing-attributes` adds support for passing an optional
`level` to the `err` and `ret` arguments to `#[instrument]`, allowing the level
of the generated return-value event to be overridden. For example,

```rust
#[instrument(err(level = "info"))]
fn my_great_function() -> Result<(), &'static str> {
// ...
}
```

will emit an `INFO`-level event if the function returns an `Err`.

In addition, this release updates the [`syn`] dependency to v2.x.x.

### Added

- `level` argument to `err` and `ret` to override the level of the generated
return value event ([#2335])
- Improved compiler error message when `#[instrument]` is added to a `const fn`
([#2418])

### Changed

- Updated `syn` dependency to 2.0 ([#2516])

### Fixed

- Fix `clippy::unreachable` warnings in `#[instrument]`-generated code ([#2356])
- Removed unused "visit" feature flag from `syn` dependency ([#2530])

### Documented

- Documented default level for `err` ([#2433])
- Improved documentation for levels in `#[instrument]` ([#2350])

Thanks to @nitnelave, @jsgf, @Abhicodes-crypto, @LukeMathWalker, @andrewpollack,
@quad, @klensy, @davidpdrsn, and @dbidwell94 for contributign to this release!

[`syn`]: https://crates.io/crates/syn
[#2335]: https://github.com/tokio-rs/tracing/pull/2335
[#2418]: https://github.com/tokio-rs/tracing/pull/2418
[#2516]: https://github.com/tokio-rs/tracing/pull/2516
[#2356]: https://github.com/tokio-rs/tracing/pull/2356
[#2530]: https://github.com/tokio-rs/tracing/pull/2530
[#2433]: https://github.com/tokio-rs/tracing/pull/2433
[#2350]: https://github.com/tokio-rs/tracing/pull/2350

# 0.1.23 (October 6, 2022)

This release of `tracing-attributes` fixes a bug where compiler diagnostic spans
for type errors in `#[instrument]`ed `async fn`s have the location of the
`#[instrument]` attribute rather than the location of the actual error, and a
bug where inner attributes in `#[instrument]`ed functions would cause a compiler
error.

### Fixed

- Fix incorrect handling of inner attributes in `#[instrument]`ed functions ([#2307])
Expand Down
2 changes: 1 addition & 1 deletion tracing-attributes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name = "tracing-attributes"
# - README.md
# - Update CHANGELOG.md.
# - Create "v0.1.x" git tag.
version = "0.1.23"
version = "0.1.24"
authors = [
"Tokio Contributors <[email protected]>",
"Eliza Weisman <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion tracing-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//!
//! ```toml
//! [dependencies]
//! tracing-attributes = "0.1.23"
//! tracing-attributes = "0.1.24"
//! ```
//!
//! The [`#[instrument]`][instrument] attribute can now be added to a function
Expand Down

0 comments on commit f7f0d9c

Please sign in to comment.