这是indexloc提供的服务,不要输入任何密码
Skip to content

tracing-0.1.38

@hawkw hawkw tagged this 25 Apr 17:31
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 (https://github.com/tokio-rs/tracing/pull/2562)
- `#[inline]` attributes for methods called by the `event!` macros,
  making generated code smaller (https://github.com/tokio-rs/tracing/pull/2555)
- **attributes**: `level` argument to `#[instrument(err)]` and
  `#[instrument(ret)]` to override the level of the generated return
  value event (https://github.com/tokio-rs/tracing/pull/2335)
- **attributes**: Improved compiler error message when `#[instrument]`
  is added to a `const fn` (https://github.com/tokio-rs/tracing/pull/2418)

### Changed

- `tracing-attributes`: updated to [0.1.24][attrs-0.1.24]
- Removed unneeded `cfg-if` dependency (https://github.com/tokio-rs/tracing/pull/2553)
- **attributes**: Updated [`syn`] dependency to 2.0 (https://github.com/tokio-rs/tracing/pull/2516)

### Fixed

- **attributes**: Fix `clippy::unreachable` warnings in
  `#[instrument]`-generated code (https://github.com/tokio-rs/tracing/pull/2356)
- **attributes**: Removed unused "visit" feature flag from `syn`
  dependency (https://github.com/tokio-rs/tracing/pull/2530)

### Documented

- **attributes**: Documented default level for `#[instrument(err)]`
  (https://github.com/tokio-rs/tracing/pull/2433)
- **attributes**: Improved documentation for levels in `#[instrument]`
  (https://github.com/tokio-rs/tracing/pull/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
Assets 2
Loading