1# 0.1.41 (November 27, 2024) 2 3[ [crates.io][crate-0.1.41] ] | [ [docs.rs][docs-0.1.41] ] 4 5This release updates the `tracing-core` dependency to [v0.1.33][core-0.1.33] and 6the `tracing-attributes` dependency to [v0.1.28][attrs-0.1.28]. 7 8### Added 9 10- **core**: Add index API for `Field` ([#2820]) 11- **core**: Allow `&[u8]` to be recorded as event/span field ([#2954]) 12 13### Changed 14 15- Bump MSRV to 1.63 ([#2793]) 16- **core**: Use const `thread_local`s when possible ([#2838]) 17 18### Fixed 19 20- Removed core imports in macros ([#2762]) 21- **attributes**: Added missing RecordTypes for instrument ([#2781]) 22- **attributes**: Change order of async and unsafe modifier ([#2864]) 23- Fix missing field prefixes ([#2878]) 24- **attributes**: Extract match scrutinee ([#2880]) 25- Fix non-simple macro usage without message ([#2879]) 26- Fix event macros with constant field names in the first position ([#2883]) 27- Allow field path segments to be keywords ([#2925]) 28- **core**: Fix missed `register_callsite` error ([#2938]) 29- **attributes**: Support const values for `target` and `name` ([#2941]) 30- Prefix macro calls with ::core to avoid clashing with local macros ([#3024]) 31 32[#2762]: https://github.com/tokio-rs/tracing/pull/2762 33[#2781]: https://github.com/tokio-rs/tracing/pull/2781 34[#2793]: https://github.com/tokio-rs/tracing/pull/2793 35[#2820]: https://github.com/tokio-rs/tracing/pull/2820 36[#2838]: https://github.com/tokio-rs/tracing/pull/2838 37[#2864]: https://github.com/tokio-rs/tracing/pull/2864 38[#2878]: https://github.com/tokio-rs/tracing/pull/2878 39[#2879]: https://github.com/tokio-rs/tracing/pull/2879 40[#2880]: https://github.com/tokio-rs/tracing/pull/2880 41[#2883]: https://github.com/tokio-rs/tracing/pull/2883 42[#2925]: https://github.com/tokio-rs/tracing/pull/2925 43[#2938]: https://github.com/tokio-rs/tracing/pull/2938 44[#2941]: https://github.com/tokio-rs/tracing/pull/2941 45[#2954]: https://github.com/tokio-rs/tracing/pull/2954 46[#3024]: https://github.com/tokio-rs/tracing/pull/3024 47[attrs-0.1.28]: 48 https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.28 49[core-0.1.33]: 50 https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.33 51[docs-0.1.41]: https://docs.rs/tracing/0.1.41/tracing/ 52[crate-0.1.41]: https://crates.io/crates/tracing/0.1.41 53 54# 0.1.40 (October 19, 2023) 55 56This release fixes a potential stack use-after-free in the 57`Instrument::into_inner` method. Only uses of this method are affected by this 58bug. 59 60### Fixed 61 62- Use `mem::ManuallyDrop` instead of `mem::forget` in `Instrument::into_inner` 63 ([#2765]) 64 65[#2765]: https://github.com/tokio-rs/tracing/pull/2765 66 67Thanks to @cramertj and @manishearth for finding and fixing this issue! 68 69# 0.1.39 (October 12, 2023) 70 71This release adds several additional features to the `tracing` macros. In 72addition, it updates the `tracing-core` dependency to [v0.1.32][core-0.1.32] and 73the `tracing-attributes` dependency to [v0.1.27][attrs-0.1.27]. 74 75### Added 76 77- Allow constant field names in macros ([#2617]) 78- Allow setting event names in macros ([#2699]) 79- **core**: Allow `ValueSet`s of any length ([#2508]) 80 81### Changed 82 83- `tracing-attributes`: updated to [0.1.27][attrs-0.1.27] 84- `tracing-core`: updated to [0.1.32][core-0.1.32] 85- **attributes**: Bump minimum version of proc-macro2 to 1.0.60 ([#2732]) 86- **attributes**: Generate less dead code for async block return type hint ([#2709]) 87 88### Fixed 89 90- Use fully qualified names in macros for items exported from std prelude 91 ([#2621], [#2757]) 92- **attributes**: Allow [`clippy::let_with_type_underscore`] in macro-generated 93 code ([#2609]) 94- **attributes**: Allow `unknown_lints` in macro-generated code ([#2626]) 95- **attributes**: Fix a compilation error in `#[instrument]` when the `"log"` 96 feature is enabled ([#2599]) 97 98### Documented 99 100- Add `axum-insights` to relevant crates. ([#2713]) 101- Fix link to RAI pattern crate documentation ([#2612]) 102- Fix docs typos and warnings ([#2581]) 103- Add `clippy-tracing` to related crates ([#2628]) 104- Add `tracing-cloudwatch` to related crates ([#2667]) 105- Fix deadlink to `tracing-etw` repo ([#2602]) 106 107[#2617]: https://github.com/tokio-rs/tracing/pull/2617 108[#2699]: https://github.com/tokio-rs/tracing/pull/2699 109[#2508]: https://github.com/tokio-rs/tracing/pull/2508 110[#2621]: https://github.com/tokio-rs/tracing/pull/2621 111[#2713]: https://github.com/tokio-rs/tracing/pull/2713 112[#2581]: https://github.com/tokio-rs/tracing/pull/2581 113[#2628]: https://github.com/tokio-rs/tracing/pull/2628 114[#2667]: https://github.com/tokio-rs/tracing/pull/2667 115[#2602]: https://github.com/tokio-rs/tracing/pull/2602 116[#2626]: https://github.com/tokio-rs/tracing/pull/2626 117[#2757]: https://github.com/tokio-rs/tracing/pull/2757 118[#2732]: https://github.com/tokio-rs/tracing/pull/2732 119[#2709]: https://github.com/tokio-rs/tracing/pull/2709 120[#2599]: https://github.com/tokio-rs/tracing/pull/2599 121[`let_with_type_underscore`]: http://rust-lang.github.io/rust-clippy/rust-1.70.0/index.html#let_with_type_underscore 122[attrs-0.1.27]: 123 https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.27 124[core-0.1.32]: 125 https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.32 126 127# 0.1.38 (April 25th, 2023) 128 129This `tracing` release changes the `Drop` implementation for `Instrumented` 130`Future`s so that the attached `Span` is entered when dropping the `Future`. This 131means that events emitted by the `Future`'s `Drop` implementation will now be 132recorded within its `Span`. It also adds `#[inline]` hints to methods called in 133the `event!` macro's expansion, for an improvement in both binary size and 134performance. 135 136Additionally, this release updates the `tracing-attributes` dependency to 137[v0.1.24][attrs-0.1.24], which updates the [`syn`] dependency to v2.x.x. 138`tracing-attributes` v0.1.24 also includes improvements to the `#[instrument]` 139macro; see [the `tracing-attributes` 0.1.24 release notes][attrs-0.1.24] for 140details. 141 142### Added 143 144- `Instrumented` futures will now enter the attached `Span` in their `Drop` 145 implementation, allowing events emitted when dropping the future to occur 146 within the span ([#2562]) 147- `#[inline]` attributes for methods called by the `event!` macros, making 148 generated code smaller ([#2555]) 149- **attributes**: `level` argument to `#[instrument(err)]` and 150 `#[instrument(ret)]` to override the level of 151 the generated return value event ([#2335]) 152- **attributes**: Improved compiler error message when `#[instrument]` is added to a `const fn` 153 ([#2418]) 154 155### Changed 156 157- `tracing-attributes`: updated to [0.1.24][attrs-0.1.24] 158- Removed unneeded `cfg-if` dependency ([#2553]) 159- **attributes**: Updated [`syn`] dependency to 2.0 ([#2516]) 160 161### Fixed 162 163- **attributes**: Fix `clippy::unreachable` warnings in `#[instrument]`-generated code ([#2356]) 164- **attributes**: Removed unused "visit" feature flag from `syn` dependency ([#2530]) 165 166### Documented 167 168- **attributes**: Documented default level for `#[instrument(err)]` ([#2433]) 169- **attributes**: Improved documentation for levels in `#[instrument]` ([#2350]) 170 171Thanks to @nitnelave, @jsgf, @Abhicodes-crypto, @LukeMathWalker, @andrewpollack, 172@quad, @klensy, @davidpdrsn, @dbidwell94, @ldm0, @NobodyXu, @ilsv, and @daxpedda 173for contributing to this release! 174 175[`syn`]: https://crates.io/crates/syn 176[attrs-0.1.24]: 177 https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.24 178[#2565]: https://github.com/tokio-rs/tracing/pull/2565 179[#2555]: https://github.com/tokio-rs/tracing/pull/2555 180[#2553]: https://github.com/tokio-rs/tracing/pull/2553 181[#2335]: https://github.com/tokio-rs/tracing/pull/2335 182[#2418]: https://github.com/tokio-rs/tracing/pull/2418 183[#2516]: https://github.com/tokio-rs/tracing/pull/2516 184[#2356]: https://github.com/tokio-rs/tracing/pull/2356 185[#2530]: https://github.com/tokio-rs/tracing/pull/2530 186[#2433]: https://github.com/tokio-rs/tracing/pull/2433 187[#2350]: https://github.com/tokio-rs/tracing/pull/2350 188 189# 0.1.37 (October 6, 2022) 190 191This release of `tracing` incorporates changes from `tracing-core` 192[v0.1.30][core-0.1.30] and `tracing-attributes` [v0.1.23][attrs-0.1.23], 193including the new `Subscriber::on_register_dispatch` method for performing late 194initialization after a `Subscriber` is registered as a `Dispatch`, and bugfixes 195for the `#[instrument]` attribute. Additionally, it fixes instances of the 196`bare_trait_objects` lint, which is now a warning on `tracing`'s MSRV and will 197become an error in the next edition. 198 199### Fixed 200 201- **attributes**: Incorrect handling of inner attributes in `#[instrument]`ed 202 functions ([#2307]) 203- **attributes**: Incorrect location of compiler diagnostic spans generated for 204 type errors in `#[instrument]`ed `async fn`s ([#2270]) 205- **attributes**: Updated `syn` dependency to fix compilation with `-Z 206 minimal-versions` ([#2246]) 207- `bare_trait_objects` warning in `valueset!` macro expansion ([#2308]) 208 209### Added 210 211- **core**: `Subscriber::on_register_dispatch` method ([#2269]) 212- **core**: `WeakDispatch` type and `Dispatch::downgrade()` function ([#2293]) 213 214### Changed 215 216- `tracing-core`: updated to [0.1.30][core-0.1.30] 217- `tracing-attributes`: updated to [0.1.23][attrs-0.1.23] 218 219### Documented 220 221- Added [`tracing-web`] and [`reqwest-tracing`] to related crates ([#2283], 222 [#2331]) 223 224Thanks to new contributors @compiler-errors, @e-nomem, @WorldSEnder, @Xiami2012, 225and @tl-rodrigo-gryzinski, as well as @jswrenn and @CAD97, for contributing to 226this release! 227 228[core-0.1.30]: https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.30 229[attrs-0.1.23]: https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.23 230[`tracing-web`]: https://crates.io/crates/tracing-web/ 231[`reqwest-tracing`]: https://crates.io/crates/reqwest-tracing/ 232[#2246]: https://github.com/tokio-rs/tracing/pull/2246 233[#2269]: https://github.com/tokio-rs/tracing/pull/2269 234[#2283]: https://github.com/tokio-rs/tracing/pull/2283 235[#2270]: https://github.com/tokio-rs/tracing/pull/2270 236[#2293]: https://github.com/tokio-rs/tracing/pull/2293 237[#2307]: https://github.com/tokio-rs/tracing/pull/2307 238[#2308]: https://github.com/tokio-rs/tracing/pull/2308 239[#2331]: https://github.com/tokio-rs/tracing/pull/2331 240 241# 0.1.36 (July 29, 2022) 242 243This release adds support for owned values and fat pointers as arguments to the 244`Span::record` method, as well as updating the minimum `tracing-core` version 245and several documentation improvements. 246 247### Fixed 248 249- Incorrect docs in `dispatcher::set_default` ([#2220]) 250- Compilation with `-Z minimal-versions` ([#2246]) 251 252### Added 253 254- Support for owned values and fat pointers in `Span::record` ([#2212]) 255- Documentation improvements ([#2208], [#2163]) 256 257### Changed 258 259- `tracing-core`: updated to [0.1.29][core-0.1.29] 260 261Thanks to @fredr, @cgbur, @jyn514, @matklad, and @CAD97 for contributing to this 262release! 263 264[core-0.1.29]: https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.29 265[#2220]: https://github.com/tokio-rs/tracing/pull/2220 266[#2246]: https://github.com/tokio-rs/tracing/pull/2246 267[#2212]: https://github.com/tokio-rs/tracing/pull/2212 268[#2208]: https://github.com/tokio-rs/tracing/pull/2208 269[#2163]: https://github.com/tokio-rs/tracing/pull/2163 270 271# 0.1.35 (June 8, 2022) 272 273This release reduces the overhead of callsite registration by using new 274`tracing-core` APIs. 275 276### Added 277 278- Use `DefaultCallsite` to reduce callsite registration overhead ([#2083]) 279 280### Changed 281 282- `tracing-core`: updated to [0.1.27][core-0.1.27] 283 284[core-0.1.27]: https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.27 285[#2088]: https://github.com/tokio-rs/tracing/pull/2083 286 287# 0.1.34 (April 14, 2022) 288 289This release includes bug fixes for the "log" support feature and for the use of 290both scoped and global default dispatchers in the same program. 291 292### Fixed 293 294- Failure to use the global default dispatcher when a thread sets a local 295 default dispatcher before the global default is set ([#2065]) 296- **log**: Compilation errors due to `async` block/fn futures becoming `!Send` 297 when the "log" feature flag is enabled ([#2073]) 298- Broken links in documentation ([#2068]) 299 300Thanks to @ben0x539 for contributing to this release! 301 302[#2065]: https://github.com/tokio-rs/tracing/pull/2065 303[#2073]: https://github.com/tokio-rs/tracing/pull/2073 304[#2068]: https://github.com/tokio-rs/tracing/pull/2068 305 306# 0.1.33 (April 9, 2022) 307 308This release adds new `span_enabled!` and `event_enabled!` variants of the 309`enabled!` macro, for testing whether a subscriber would specifically enable a 310span or an event. 311 312### Added 313 314- `span_enabled!` and `event_enabled!` macros ([#1900]) 315- Several documentation improvements ([#2010], [#2012]) 316 317### Fixed 318 319- Compilation warning when compiling for <=32-bit targets (including `wasm32`) 320 ([#2060]) 321 322Thanks to @guswynn, @arifd, @hrxi, @CAD97, and @name1e5s for contributing to 323this release! 324 325[#1900]: https://github.com/tokio-rs/tracing/pull/1900 326[#2010]: https://github.com/tokio-rs/tracing/pull/2010 327[#2012]: https://github.com/tokio-rs/tracing/pull/2012 328[#2060]: https://github.com/tokio-rs/tracing/pull/2060 329 330# 0.1.32 (March 8th, 2022) 331 332This release reduces the overhead of creating and dropping disabled 333spans significantly, which should improve performance when no `tracing` 334subscriber is in use or when spans are disabled by a filter. 335 336### Fixed 337 338- **attributes**: Compilation failure with `--minimal-versions` due to a 339 too-permissive `syn` dependency ([#1960]) 340 341### Changed 342 343- Reduced `Drop` overhead for disabled spans ([#1974]) 344- `tracing-attributes`: updated to [0.1.20][attributes-0.1.20] 345 346[#1974]: https://github.com/tokio-rs/tracing/pull/1974 347[#1960]: https://github.com/tokio-rs/tracing/pull/1960 348[attributes-0.1.20]: https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.20 349 350# 0.1.31 (February 17th, 2022) 351 352This release increases the minimum supported Rust version (MSRV) to 1.49.0. In 353addition, it fixes some relatively rare macro bugs. 354 355### Added 356 357- Added `tracing-forest` to the list of related crates ([#1935]) 358 359### Changed 360 361- Updated minimum supported Rust version (MSRV) to 1.49.0 ([#1913]) 362 363### Fixed 364 365- Fixed the `warn!` macro incorrectly generating an event with the `TRACE` level 366 ([#1930]) 367- Fixed macro hygiene issues when used in a crate that defines its own `concat!` 368 macro, for real this time ([#1918]) 369 370Thanks to @QnnOkabayashi, @nicolaasg, and @teohhanhui for contributing to this 371release! 372 373[#1935]: https://github.com/tokio-rs/tracing/pull/1935 374[#1913]: https://github.com/tokio-rs/tracing/pull/1913 375[#1930]: https://github.com/tokio-rs/tracing/pull/1930 376[#1918]: https://github.com/tokio-rs/tracing/pull/1918 377 378# 0.1.30 (February 3rd, 2022) 379 380This release adds *experimental* support for recording structured field 381values using the [`valuable`] crate. See [this blog post][post] for 382details on `valuable`. 383 384Note that `valuable` support currently requires `--cfg tracing_unstable`. See 385the documentation for details. 386 387This release also adds a new `enabled!` macro for testing if a span or event 388would be enabled. 389 390### Added 391 392- **field**: Experimental support for recording field values using the 393 [`valuable`] crate ([#1608], [#1888], [#1887]) 394- `enabled!` macro for testing if a span or event is enabled ([#1882]) 395 396### Changed 397 398- `tracing-core`: updated to [0.1.22][core-0.1.22] 399- `tracing-attributes`: updated to [0.1.19][attributes-0.1.19] 400 401### Fixed 402 403- **log**: Fixed "use of moved value" compiler error when the "log" feature is 404 enabled ([#1823]) 405- Fixed macro hygiene issues when used in a crate that defines its own `concat!` 406 macro ([#1842]) 407- A very large number of documentation fixes and improvements. 408 409Thanks to @@Vlad-Scherbina, @Skepfyr, @Swatinem, @guswynn, @teohhanhui, 410@xd009642, @tobz, @d-e-s-o@0b01, and @nickelc for contributing to this release! 411 412[`valuable`]: https://crates.io/crates/valuable 413[post]: https://tokio.rs/blog/2021-05-valuable 414[core-0.1.22]: https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.22 415[attributes-0.1.19]: https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.19 416[#1608]: https://github.com/tokio-rs/tracing/pull/1608 417[#1888]: https://github.com/tokio-rs/tracing/pull/1888 418[#1887]: https://github.com/tokio-rs/tracing/pull/1887 419[#1882]: https://github.com/tokio-rs/tracing/pull/1882 420[#1823]: https://github.com/tokio-rs/tracing/pull/1823 421[#1842]: https://github.com/tokio-rs/tracing/pull/1842 422 423# 0.1.29 (October 5th, 2021) 424 425This release adds support for recording `Option<T> where T: Value` as typed 426`tracing` field values. It also includes significant performance improvements 427for functions annotated with the `#[instrument]` attribute when the generated 428span is disabled. 429 430### Changed 431 432- `tracing-core`: updated to v0.1.21 433- `tracing-attributes`: updated to v0.1.18 434 435### Added 436 437- **field**: `Value` impl for `Option<T> where T: Value` ([#1585]) 438- **attributes**: - improved performance when skipping `#[instrument]`-generated 439 spans below the max level ([#1600], [#1605], [#1614], [#1616], [#1617]) 440 441### Fixed 442 443- **instrument**: added missing `Future` implementation for `WithSubscriber`, 444 making the `WithDispatch` extension trait actually useable ([#1602]) 445- Documentation fixes and improvements ([#1595], [#1601], [#1597]) 446 447Thanks to @brianburgers, @mattiast, @DCjanus, @oli-obk, and @matklad for 448contributing to this release! 449 450[#1585]: https://github.com/tokio-rs/tracing/pull/1585 451[#1595]: https://github.com/tokio-rs/tracing/pull/1596 452[#1597]: https://github.com/tokio-rs/tracing/pull/1597 453[#1600]: https://github.com/tokio-rs/tracing/pull/1600 454[#1601]: https://github.com/tokio-rs/tracing/pull/1601 455[#1602]: https://github.com/tokio-rs/tracing/pull/1602 456[#1605]: https://github.com/tokio-rs/tracing/pull/1605 457[#1614]: https://github.com/tokio-rs/tracing/pull/1614 458[#1616]: https://github.com/tokio-rs/tracing/pull/1616 459[#1617]: https://github.com/tokio-rs/tracing/pull/1617 460 461# 0.1.28 (September 17th, 2021) 462 463This release fixes an issue where the RustDoc documentation was rendered 464incorrectly. It doesn't include any actual code changes, and is very boring and 465can be ignored. 466 467### Fixed 468 469- **docs**: Incorrect documentation rendering due to unclosed `<div>` tag 470 ([#1572]) 471 472[#1572]: https://github.com/tokio-rs/tracing/pull/1572 473 474# 0.1.27 (September 13, 2021) 475 476This release adds a new [`Span::or_current`] method to aid in efficiently 477propagating span contexts to spawned threads or tasks. Additionally, it updates 478the [`tracing-core`] version to [0.1.20] and the [`tracing-attributes`] version to 479[0.1.16], ensuring that a number of new features in those crates are present. 480 481### Fixed 482 483- **instrument**: Added missing `WithSubscriber` implementations for futures and 484 other types ([#1424]) 485 486### Added 487 488- `Span::or_current` method, to help with efficient span context propagation 489 ([#1538]) 490- **attributes**: add `skip_all` option to `#[instrument]` ([#1548]) 491- **attributes**: record primitive types as primitive values rather than as 492 `fmt::Debug` ([#1378]) 493- **core**: `NoSubscriber`, a no-op `Subscriber` implementation 494 ([#1549]) 495- **core**: Added `Visit::record_f64` and support for recording floating-point 496 values ([#1507], [#1522]) 497- A large number of documentation improvements and fixes ([#1369], [#1398], 498 [#1435], [#1442], [#1524], [#1556]) 499 500Thanks to new contributors @dzvon and @mbergkvist, as well as @teozkr, 501@maxburke, @LukeMathWalker, and @jsgf, for contributing to this 502release! 503 504[`Span::or_current`]: https://docs.rs/tracing/0.1.27/tracing/struct.Span.html#method.or_current 505[`tracing-core`]: https://crates.io/crates/tracing-core 506[`tracing-attributes`]: https://crates.io/crates/tracing-attributes 507[`tracing-core`]: https://crates.io/crates/tracing-core 508[0.1.20]: https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.20 509[0.1.16]: https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.16 510[#1424]: https://github.com/tokio-rs/tracing/pull/1424 511[#1538]: https://github.com/tokio-rs/tracing/pull/1538 512[#1548]: https://github.com/tokio-rs/tracing/pull/1548 513[#1378]: https://github.com/tokio-rs/tracing/pull/1378 514[#1507]: https://github.com/tokio-rs/tracing/pull/1507 515[#1522]: https://github.com/tokio-rs/tracing/pull/1522 516[#1369]: https://github.com/tokio-rs/tracing/pull/1369 517[#1398]: https://github.com/tokio-rs/tracing/pull/1398 518[#1435]: https://github.com/tokio-rs/tracing/pull/1435 519[#1442]: https://github.com/tokio-rs/tracing/pull/1442 520[#1524]: https://github.com/tokio-rs/tracing/pull/1524 521[#1556]: https://github.com/tokio-rs/tracing/pull/1556 522 523# 0.1.26 (April 30, 2021) 524 525### Fixed 526 527- **attributes**: Compatibility between `#[instrument]` and `async-trait` 528 v0.1.43 and newer ([#1228]) 529- Several documentation fixes ([#1305], [#1344]) 530### Added 531 532- `Subscriber` impl for `Box<dyn Subscriber + Send + Sync + 'static>` ([#1358]) 533- `Subscriber` impl for `Arc<dyn Subscriber + Send + Sync + 'static>` ([#1374]) 534- Symmetric `From` impls for existing `Into` impls on `span::Current`, `Span`, 535 and `Option<Id>` ([#1335], [#1338]) 536- `From<EnteredSpan>` implementation for `Option<Id>`, allowing `EnteredSpan` to 537 be used in a `span!` macro's `parent:` field ([#1325]) 538- `Attributes::fields` accessor that returns the set of fields defined on a 539 span's `Attributes` ([#1331]) 540 541 542Thanks to @Folyd, @nightmared, and new contributors @rmsc and @Fishrock123 for 543contributing to this release! 544 545[#1227]: https://github.com/tokio-rs/tracing/pull/1228 546[#1305]: https://github.com/tokio-rs/tracing/pull/1305 547[#1325]: https://github.com/tokio-rs/tracing/pull/1325 548[#1338]: https://github.com/tokio-rs/tracing/pull/1338 549[#1344]: https://github.com/tokio-rs/tracing/pull/1344 550[#1358]: https://github.com/tokio-rs/tracing/pull/1358 551[#1374]: https://github.com/tokio-rs/tracing/pull/1374 552[#1335]: https://github.com/tokio-rs/tracing/pull/1335 553[#1331]: https://github.com/tokio-rs/tracing/pull/1331 554 555# 0.1.25 (February 23, 2021) 556 557### Added 558 559- `Span::entered` method for entering a span and moving it into a guard by value 560 rather than borrowing it ([#1252]) 561 562Thanks to @matklad for contributing to this release! 563 564[#1252]: https://github.com/tokio-rs/tracing/pull/1252 565 566# 0.1.24 (February 17, 2021) 567 568### Fixed 569 570- **attributes**: Compiler error when using `#[instrument(err)]` on functions 571 which return `impl Trait` ([#1236]) 572- Fixed broken match arms in event macros ([#1239]) 573- Documentation improvements ([#1232]) 574 575Thanks to @bkchr and @lfranke for contributing to this release! 576 577[#1236]: https://github.com/tokio-rs/tracing/pull/1236 578[#1239]: https://github.com/tokio-rs/tracing/pull/1239 579[#1232]: https://github.com/tokio-rs/tracing/pull/1232 580 581# 0.1.23 (February 4, 2021) 582 583### Fixed 584 585- **attributes**: Compiler error when using `#[instrument(err)]` on functions 586 with mutable parameters ([#1167]) 587- **attributes**: Missing function visibility modifier when using 588 `#[instrument]` with `async-trait` ([#977]) 589- **attributes** Removed unused `syn` features ([#928]) 590- **log**: Fixed an issue where the `tracing` macros would generate code for 591 events whose levels are disabled statically by the `log` crate's 592 `static_max_level_XXX` features ([#1175]) 593- Fixed deprecations and clippy lints ([#1195]) 594- Several documentation fixes and improvements ([#941], [#965], [#981], [#1146], 595 [#1215]) 596 597### Changed 598 599- **attributes**: `tracing-futures` dependency is no longer required when using 600 `#[instrument]` on async functions ([#808]) 601- **attributes**: Updated `tracing-attributes` minimum dependency to v0.1.12 602 ([#1222]) 603 604Thanks to @nagisa, @Txuritan, @TaKO8Ki, @okready, and @krojew for contributing 605to this release! 606 607[#1167]: https://github.com/tokio-rs/tracing/pull/1167 608[#977]: https://github.com/tokio-rs/tracing/pull/977 609[#965]: https://github.com/tokio-rs/tracing/pull/965 610[#981]: https://github.com/tokio-rs/tracing/pull/981 611[#1215]: https://github.com/tokio-rs/tracing/pull/1215 612[#808]: https://github.com/tokio-rs/tracing/pull/808 613[#941]: https://github.com/tokio-rs/tracing/pull/941 614[#1146]: https://github.com/tokio-rs/tracing/pull/1146 615[#1175]: https://github.com/tokio-rs/tracing/pull/1175 616[#1195]: https://github.com/tokio-rs/tracing/pull/1195 617[#1222]: https://github.com/tokio-rs/tracing/pull/1222 618 619# 0.1.22 (November 23, 2020) 620 621### Changed 622 623- Updated `pin-project-lite` dependency to 0.2 ([#1108]) 624 625[#1108]: https://github.com/tokio-rs/tracing/pull/1108 626 627# 0.1.21 (September 28, 2020) 628 629### Fixed 630 631- Incorrect inlining of `Span::new`, `Span::new_root`, and `Span::new_child_of`, 632 which could result in `dispatcher::get_default` being inlined at the callsite 633 ([#994]) 634- Regression where using a struct field as a span or event field when other 635 fields on that struct are borrowed mutably would fail to compile ([#987]) 636 637### Changed 638 639- Updated `tracing-core` to 0.1.17 ([#992]) 640 641### Added 642 643- `Instrument` trait and `Instrumented` type for attaching a `Span` to a 644 `Future` ([#808]) 645- `Copy` implementations for `Level` and `LevelFilter` ([#992]) 646- Multiple documentation fixes and improvements ([#964], [#980], [#981]) 647 648Thanks to @nagisa, and new contributors @SecurityInsanity, @froydnj, @jyn514 and 649@TaKO8Ki for contributing to this release! 650 651[#994]: https://github.com/tokio-rs/tracing/pull/994 652[#992]: https://github.com/tokio-rs/tracing/pull/992 653[#987]: https://github.com/tokio-rs/tracing/pull/987 654[#980]: https://github.com/tokio-rs/tracing/pull/980 655[#981]: https://github.com/tokio-rs/tracing/pull/981 656[#964]: https://github.com/tokio-rs/tracing/pull/964 657[#808]: https://github.com/tokio-rs/tracing/pull/808 658 659# 0.1.20 (August 24, 2020) 660 661### Changed 662 663- Significantly reduced assembly generated by macro invocations (#943) 664- Updated `tracing-core` to 0.1.15 (#943) 665 666### Added 667 668- Documented minimum supported Rust version policy (#941) 669 670# 0.1.19 (August 10, 2020) 671 672### Fixed 673 674- Updated `tracing-core` to fix incorrect calculation of the global max level 675 filter (#908) 676 677### Added 678 679- **attributes**: Support for using `self` in field expressions when 680 instrumenting `async-trait` functions (#875) 681- Several documentation improvements (#832, #881, #896, #897, #911, #913) 682 683Thanks to @anton-dutov, @nightmared, @mystor, and @toshokan for contributing to 684this release! 685 686# 0.1.18 (July 31, 2020) 687 688### Fixed 689 690- Fixed a bug where `LevelFilter::OFF` (and thus also the `static_max_level_off` 691 feature flag) would enable *all* traces, rather than *none* (#853) 692- **log**: Fixed `tracing` macros and `Span`s not checking `log::max_level` 693 before emitting `log` records (#870) 694 695### Changed 696 697- **macros**: Macros now check the global max level (`LevelFilter::current`) 698 before the per-callsite cache when determining if a span or event is enabled. 699 This significantly improves performance in some use cases (#853) 700- **macros**: Simplified the code generated by macro expansion significantly, 701 which may improve compile times and/or `rustc` optimizatation of surrounding 702 code (#869, #869) 703- **macros**: Macros now check the static max level before checking any runtime 704 filtering, improving performance when a span or event is disabled by a 705 `static_max_level_XXX` feature flag (#868) 706- `LevelFilter` is now a re-export of the `tracing_core::LevelFilter` type, it 707 can now be used interchangeably with the versions in `tracing-core` and 708 `tracing-subscriber` (#853) 709- Significant performance improvements when comparing `LevelFilter`s and 710 `Level`s (#853) 711- Updated the minimum `tracing-core` dependency to 0.1.12 (#853) 712 713### Added 714 715- **macros**: Quoted string literals may now be used as field names, to allow 716 fields whose names are not valid Rust identifiers (#790) 717- **docs**: Several documentation improvements (#850, #857, #841) 718- `LevelFilter::current()` function, which returns the highest level that any 719 subscriber will enable (#853) 720- `Subscriber::max_level_hint` optional trait method, for setting the value 721 returned by `LevelFilter::current()` (#853) 722 723Thanks to new contributors @cuviper, @ethanboxx, @ben0x539, @dignati, 724@colelawrence, and @rbtcollins for helping out with this release! 725 726# 0.1.17 (July 22, 2020) 727 728### Changed 729 730- **log**: Moved verbose span enter/exit log records to "tracing::span::active" 731 target, allowing them to be filtered separately (#833) 732- **log**: All span lifecycle log records without fields now have the `Trace` 733 log filter, to guard against `log` users enabling them by default with blanket 734 level filtering (#833) 735 736### Fixed 737 738- **log**/**macros**: Fixed missing implicit imports of the 739 `tracing::field::debug` and `tracing::field::display` functions inside the 740 macros when the "log" feature is enabled (#835) 741 742# 0.1.16 (July 8, 2020) 743 744### Added 745 746- **attributes**: Support for arbitrary expressions as fields in `#[instrument]` (#672) 747- **attributes**: `#[instrument]` now emits a compiler warning when ignoring unrecognized 748 input (#672, #786) 749- Improved documentation on using `tracing` in async code (#769) 750 751### Changed 752 753- Updated `tracing-core` dependency to 0.1.11 754 755### Fixed 756 757- **macros**: Excessive monomorphization in macros, which could lead to 758 longer compilation times (#787) 759- **log**: Compiler warnings in macros when `log` or `log-always` features 760 are enabled (#753) 761- Compiler error when `tracing-core/std` feature is enabled but `tracing/std` is 762 not (#760) 763 764Thanks to @nagisa for contributing to this release! 765 766# 0.1.15 (June 2, 2020) 767 768### Changed 769 770- **macros**: Replaced use of legacy `local_inner_macros` with `$crate::` (#740) 771 772### Added 773 774- Docs fixes and improvements (#742, #731, #730) 775 776Thanks to @bnjjj, @blaenk, and @LukeMathWalker for contributing to this release! 777 778# 0.1.14 (May 14, 2020) 779 780### Added 781 782- **log**: When using the [`log`] compatibility feature alongside a `tracing` 783 `Subscriber`, log records for spans now include span IDs (#613) 784- **attributes**: Support for using `#[instrument]` on methods that are part of 785 [`async-trait`] trait implementations (#711) 786- **attributes**: Optional `#[instrument(err)]` argument to automatically emit 787 an event if an instrumented function returns `Err` (#637) 788- Added `#[must_use]` attribute to the guard returned by 789 `subscriber::set_default` (#685) 790 791### Changed 792 793- **log**: Made [`log`] records emitted by spans much less noisy when span IDs are 794 not available (#613) 795 796### Fixed 797 798- Several typos in the documentation (#656, #710, #715) 799 800Thanks to @FintanH, @shepmaster, @inanna-malick, @zekisharif, @bkchr, @majecty, 801@ilana and @nightmared for contributing to this release! 802 803[`async-trait`]: https://crates.io/crates/async-trait 804[`log`]: https://crates.io/crates/log 805 806# 0.1.13 (February 26, 2019) 807 808### Added 809 810- **field**: `field::Empty` type for declaring empty fields whose values will be 811 recorded later (#548) 812- **field**: `field::Value` implementations for `Wrapping` and `NonZero*` 813 numbers (#538) 814- **attributes**: Support for adding arbitrary literal fields to spans generated 815 by `#[instrument]` (#569) 816- **attributes**: `#[instrument]` now emits a helpful compiler error when 817 attempting to skip a function parameter (#600) 818 819### Changed 820 821- **attributes**: The `#[instrument]` attribute was placed under an on-by-default 822 feature flag "attributes" (#603) 823 824### Fixed 825 826- Broken and unresolvable links in RustDoc (#595) 827 828Thanks to @oli-cosmian and @Kobzol for contributing to this release! 829 830# 0.1.12 (January 11, 2019) 831 832### Added 833 834- `Span::with_subscriber` method to access the subscriber that tracks a `Span` 835 (#503) 836- API documentation now shows which features are required by feature-flagged 837 items (#523) 838- Improved README examples (#496) 839- Documentation links to related crates (#507) 840 841# 0.1.11 (December 20, 2019) 842 843### Added 844 845- `Span::is_none` method (#475) 846- `LevelFilter::into_level` method (#470) 847- `LevelFilter::from_level` function and `From<Level>` impl (#471) 848- Documented minimum supported Rust version (#482) 849 850### Fixed 851 852- Incorrect parameter type to `Span::follows_from` that made it impossible to 853 call (#467) 854- Missing whitespace in `log` records generated when enabling the `log` feature 855 flag (#484) 856- Typos and missing links in documentation (#405, #423, #439) 857 858# 0.1.10 (October 23, 2019) 859 860### Added 861 862- Support for destructuring in arguments to `#[instrument]`ed functions (#397) 863- Generated field for `self` parameters when `#[instrument]`ing methods (#397) 864- Optional `skip` argument to `#[instrument]` for excluding function parameters 865 from generated spans (#359) 866- Added `dispatcher::set_default` and `subscriber::set_default` APIs, which 867 return a drop guard (#388) 868 869### Fixed 870 871- Some minor documentation errors (#356, #370) 872 873# 0.1.9 (September 13, 2019) 874 875### Fixed 876 877- Fixed `#[instrument]`ed async functions not compiling on `nightly-2019-09-11` 878 or newer (#342) 879 880### Changed 881 882- Significantly reduced performance impact of skipped spans and events when a 883 `Subscriber` is not in use (#326) 884- The `log` feature will now only cause `tracing` spans and events to emit log 885 records when a `Subscriber` is not in use (#346) 886 887### Added 888 889- Added support for overriding the name of the span generated by `#[instrument]` 890 (#330) 891- `log-always` feature flag to emit log records even when a `Subscriber` is set 892 (#346) 893 894# 0.1.8 (September 3, 2019) 895 896### Changed 897 898- Reorganized and improved API documentation (#317) 899 900### Removed 901 902- Dev-dependencies on `ansi_term` and `humantime` crates, which were used only 903 for examples (#316) 904 905# 0.1.7 (August 30, 2019) 906 907### Changed 908 909- New (curly-brace free) event message syntax to place the message in the first 910 field rather than the last (#309) 911 912### Fixed 913 914- Fixed a regression causing macro stack exhaustion when the `log` feature flag 915 is enabled (#304) 916 917# 0.1.6 (August 20, 2019) 918 919### Added 920 921- `std::error::Error` as a new primitive type (#277) 922- Support for mixing key-value fields and `format_args` messages without curly 923 braces as delimiters (#288) 924 925### Changed 926 927- `tracing-core` dependency to 0.1.5 (#294) 928- `tracing-attributes` dependency to 0.1.2 (#297) 929 930# 0.1.5 (August 9, 2019) 931 932### Added 933 934- Support for `no-std` + `liballoc` (#263) 935 936### Changed 937 938- Using the `#[instrument]` attribute on `async fn`s no longer requires a 939 feature flag (#258) 940 941### Fixed 942 943- The `#[instrument]` macro now works on generic functions (#262) 944 945# 0.1.4 (August 8, 2019) 946 947### Added 948 949- `#[instrument]` attribute for automatically adding spans to functions (#253) 950 951# 0.1.3 (July 11, 2019) 952 953### Added 954 955- Log messages when a subscriber indicates that a span has closed, when the 956 `log` feature flag is enabled (#180). 957 958### Changed 959 960- `tracing-core` minimum dependency version to 0.1.2 (#174). 961 962### Fixed 963 964- Fixed an issue where event macro invocations with a single field, using local 965 variable shorthand, would recur infinitely (#166). 966- Fixed uses of deprecated `tracing-core` APIs (#174). 967 968# 0.1.2 (July 6, 2019) 969 970### Added 971 972- `Span::none()` constructor, which does not require metadata and 973 returns a completely empty span (#147). 974- `Span::current()` function, returning the current span if it is 975 known to the subscriber (#148). 976 977### Fixed 978 979- Broken macro imports when used prefixed with `tracing::` (#152). 980 981# 0.1.1 (July 3, 2019) 982 983### Changed 984 985- `cfg_if` dependency to 0.1.9. 986 987### Fixed 988 989- Compilation errors when the `log` feature is enabled (#131). 990- Unclear wording and typos in documentation (#124, #128, #142). 991 992# 0.1.0 (June 27, 2019) 993 994- Initial release 995