Skip to content

Commit 3de7f8c

Browse files
authored
tracing: prepare to release v0.1.38 (#2575)
# 0.1.38 (April 25th, 2023) This `tracing` release changes the `Drop` implementation for `Instrumented` `Future`s so that the attached `Span` is entered when dropping the `Future`. This means that events emitted by the `Future`'s `Drop` implementation will now be recorded within its `Span`. It also adds `#[inline]` hints to methods called in the `event!` macro's expansion, for an improvement in both binary size and performance. Additionally, this release updates the `tracing-attributes` dependency to [v0.1.24][attrs-0.1.24], which updates the [`syn`] dependency to v2.x.x. `tracing-attributes` v0.1.24 also includes improvements to the `#[instrument]` macro; see [the `tracing-attributes` 0.1.24 release notes][attrs-0.1.24] for details. ### Added - `Instrumented` futures will now enter the attached `Span` in their `Drop` implementation, allowing events emitted when dropping the future to occur within the span (#2562) - `#[inline]` attributes for methods called by the `event!` macros, making generated code smaller (#2555) - **attributes**: `level` argument to `#[instrument(err)]` and `#[instrument(ret)]` to override the level of the generated return value event (#2335) - **attributes**: Improved compiler error message when `#[instrument]` is added to a `const fn` (#2418) ### Changed - `tracing-attributes`: updated to [0.1.24][attrs-0.1.24] - Removed unneeded `cfg-if` dependency (#2553) - **attributes**: Updated [`syn`] dependency to 2.0 (#2516) ### Fixed - **attributes**: Fix `clippy::unreachable` warnings in `#[instrument]`-generated code (#2356) - **attributes**: Removed unused "visit" feature flag from `syn` dependency (#2530) ### Documented - **attributes**: Documented default level for `#[instrument(err)]` (#2433) - **attributes**: Improved documentation for levels in `#[instrument]` (#2350) Thanks to @nitnelave, @jsgf, @Abhicodes-crypto, @LukeMathWalker, @andrewpollack, @quad, @klensy, @davidpdrsn, @dbidwell94, @ldm0, @NobodyXu, @ilsv, and @daxpedda for contributing to this release! [`syn`]: https://crates.io/crates/syn [attrs-0.1.24]: https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.24
1 parent e35265a commit 3de7f8c

File tree

4 files changed

+68
-6
lines changed

4 files changed

+68
-6
lines changed

tracing/CHANGELOG.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,65 @@
1+
# 0.1.38 (April 25th, 2023)
2+
3+
This `tracing` release changes the `Drop` implementation for `Instrumented`
4+
`Future`s so that the attached `Span` is entered when dropping the `Future`. This
5+
means that events emitted by the `Future`'s `Drop` implementation will now be
6+
recorded within its `Span`. It also adds `#[inline]` hints to methods called in
7+
the `event!` macro's expansion, for an improvement in both binary size and
8+
performance.
9+
10+
Additionally, this release updates the `tracing-attributes` dependency to
11+
[v0.1.24][attrs-0.1.24], which updates the [`syn`] dependency to v2.x.x.
12+
`tracing-attributes` v0.1.24 also includes improvements to the `#[instrument]`
13+
macro; see [the `tracing-attributes` 0.1.24 release notes][attrs-0.1.24] for
14+
details.
15+
16+
### Added
17+
18+
- `Instrumented` futures will now enter the attached `Span` in their `Drop`
19+
implementation, allowing events emitted when dropping the future to occur
20+
within the span ([#2562])
21+
- `#[inline]` attributes for methods called by the `event!` macros, making
22+
generated code smaller ([#2555])
23+
- **attributes**: `level` argument to `#[instrument(err)]` and
24+
`#[instrument(ret)]` to override the level of
25+
the generated return value event ([#2335])
26+
- **attributes**: Improved compiler error message when `#[instrument]` is added to a `const fn`
27+
([#2418])
28+
29+
### Changed
30+
31+
- `tracing-attributes`: updated to [0.1.24][attrs-0.1.24]
32+
- Removed unneeded `cfg-if` dependency ([#2553])
33+
- **attributes**: Updated [`syn`] dependency to 2.0 ([#2516])
34+
35+
### Fixed
36+
37+
- **attributes**: Fix `clippy::unreachable` warnings in `#[instrument]`-generated code ([#2356])
38+
- **attributes**: Removed unused "visit" feature flag from `syn` dependency ([#2530])
39+
40+
### Documented
41+
42+
- **attributes**: Documented default level for `#[instrument(err)]` ([#2433])
43+
- **attributes**: Improved documentation for levels in `#[instrument]` ([#2350])
44+
45+
Thanks to @nitnelave, @jsgf, @Abhicodes-crypto, @LukeMathWalker, @andrewpollack,
46+
@quad, @klensy, @davidpdrsn, @dbidwell94, @ldm0, @NobodyXu, @ilsv, and @daxpedda
47+
for contributing to this release!
48+
49+
[`syn`]: https://crates.io/crates/syn
50+
[attrs-0.1.24]:
51+
https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.24
52+
[#2565]: https://github.com/tokio-rs/tracing/pull/2565
53+
[#2555]: https://github.com/tokio-rs/tracing/pull/2555
54+
[#2553]: https://github.com/tokio-rs/tracing/pull/2553
55+
[#2335]: https://github.com/tokio-rs/tracing/pull/2335
56+
[#2418]: https://github.com/tokio-rs/tracing/pull/2418
57+
[#2516]: https://github.com/tokio-rs/tracing/pull/2516
58+
[#2356]: https://github.com/tokio-rs/tracing/pull/2356
59+
[#2530]: https://github.com/tokio-rs/tracing/pull/2530
60+
[#2433]: https://github.com/tokio-rs/tracing/pull/2433
61+
[#2350]: https://github.com/tokio-rs/tracing/pull/2350
62+
163
# 0.1.37 (October 6, 2022)
264

365
This release of `tracing` incorporates changes from `tracing-core`

tracing/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name = "tracing"
88
# - README.md
99
# - Update CHANGELOG.md.
1010
# - Create "v0.1.x" git tag
11-
version = "0.1.37"
11+
version = "0.1.38"
1212
authors = ["Eliza Weisman <[email protected]>", "Tokio Contributors <[email protected]>"]
1313
license = "MIT"
1414
readme = "README.md"
@@ -30,7 +30,7 @@ rust-version = "1.56.0"
3030
[dependencies]
3131
tracing-core = { path = "../tracing-core", version = "0.1.30", default-features = false }
3232
log = { version = "0.4.17", optional = true }
33-
tracing-attributes = { path = "../tracing-attributes", version = "0.1.23", optional = true }
33+
tracing-attributes = { path = "../tracing-attributes", version = "0.1.24", optional = true }
3434
pin-project-lite = "0.2.9"
3535

3636
[dev-dependencies]

tracing/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ fn main() {
9898
```toml
9999
[dependencies]
100100
tracing = "0.1"
101-
tracing-subscriber = "0.2.0"
101+
tracing-subscriber = "0.3.0"
102102
```
103103

104104
This subscriber will be used as the default in all threads for the remainder of the duration
@@ -250,7 +250,7 @@ my_future
250250
is as long as the future's.
251251

252252
The second, and preferred, option is through the
253-
[`#[instrument]`](https://docs.rs/tracing/0.1.37/tracing/attr.instrument.html)
253+
[`#[instrument]`](https://docs.rs/tracing/0.1.38/tracing/attr.instrument.html)
254254
attribute:
255255

256256
```rust
@@ -297,7 +297,7 @@ span.in_scope(|| {
297297
// Dropping the span will close it, indicating that it has ended.
298298
```
299299

300-
The [`#[instrument]`](https://docs.rs/tracing/0.1.37/tracing/attr.instrument.html) attribute macro
300+
The [`#[instrument]`](https://docs.rs/tracing/0.1.38/tracing/attr.instrument.html) attribute macro
301301
can reduce some of this boilerplate:
302302

303303
```rust

tracing/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@
817817
//!
818818
//! ```toml
819819
//! [dependencies]
820-
//! tracing = { version = "0.1.37", default-features = false }
820+
//! tracing = { version = "0.1.38", default-features = false }
821821
//! ```
822822
//!
823823
//! <pre class="ignore" style="white-space:normal;font:inherit;">

0 commit comments

Comments
 (0)