Skip to content

Commit e35265a

Browse files
authored
attributes: prepare to release v0.1.24 (#2574)
# 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
1 parent 0114ec1 commit e35265a

File tree

3 files changed

+53
-2
lines changed

3 files changed

+53
-2
lines changed

tracing-attributes/CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,61 @@
1+
# 0.1.24 (April 24th, 2023)
2+
3+
This release of `tracing-attributes` adds support for passing an optional
4+
`level` to the `err` and `ret` arguments to `#[instrument]`, allowing the level
5+
of the generated return-value event to be overridden. For example,
6+
7+
```rust
8+
#[instrument(err(level = "info"))]
9+
fn my_great_function() -> Result<(), &'static str> {
10+
// ...
11+
}
12+
```
13+
14+
will emit an `INFO`-level event if the function returns an `Err`.
15+
16+
In addition, this release updates the [`syn`] dependency to v2.x.x.
17+
18+
### Added
19+
20+
- `level` argument to `err` and `ret` to override the level of the generated
21+
return value event ([#2335])
22+
- Improved compiler error message when `#[instrument]` is added to a `const fn`
23+
([#2418])
24+
25+
### Changed
26+
27+
- Updated `syn` dependency to 2.0 ([#2516])
28+
29+
### Fixed
30+
31+
- Fix `clippy::unreachable` warnings in `#[instrument]`-generated code ([#2356])
32+
- Removed unused "visit" feature flag from `syn` dependency ([#2530])
33+
34+
### Documented
35+
36+
- Documented default level for `err` ([#2433])
37+
- Improved documentation for levels in `#[instrument]` ([#2350])
38+
39+
Thanks to @nitnelave, @jsgf, @Abhicodes-crypto, @LukeMathWalker, @andrewpollack,
40+
@quad, @klensy, @davidpdrsn, and @dbidwell94 for contributign to this release!
41+
42+
[`syn`]: https://crates.io/crates/syn
43+
[#2335]: https://github.com/tokio-rs/tracing/pull/2335
44+
[#2418]: https://github.com/tokio-rs/tracing/pull/2418
45+
[#2516]: https://github.com/tokio-rs/tracing/pull/2516
46+
[#2356]: https://github.com/tokio-rs/tracing/pull/2356
47+
[#2530]: https://github.com/tokio-rs/tracing/pull/2530
48+
[#2433]: https://github.com/tokio-rs/tracing/pull/2433
49+
[#2350]: https://github.com/tokio-rs/tracing/pull/2350
50+
151
# 0.1.23 (October 6, 2022)
252

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

1061
- Fix incorrect handling of inner attributes in `#[instrument]`ed functions ([#2307])

tracing-attributes/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name = "tracing-attributes"
88
# - README.md
99
# - Update CHANGELOG.md.
1010
# - Create "v0.1.x" git tag.
11-
version = "0.1.23"
11+
version = "0.1.24"
1212
authors = [
1313
"Tokio Contributors <[email protected]>",
1414
"Eliza Weisman <[email protected]>",

tracing-attributes/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//!
1717
//! ```toml
1818
//! [dependencies]
19-
//! tracing-attributes = "0.1.23"
19+
//! tracing-attributes = "0.1.24"
2020
//! ```
2121
//!
2222
//! The [`#[instrument]`][instrument] attribute can now be added to a function

0 commit comments

Comments
 (0)