1# 0.1.28 (November 26, 2024) 2 3### Changed 4 5- Bump MSRV to 1.63 ([#2793]) 6 7### Fixed 8 9- Added missing RecordTypes for instrument ([#2781]) 10- Change order of async and unsafe modifier ([#2864]) 11- Extract match scrutinee ([#2880]) 12- Allow field path segments to be keywords ([#2925]) 13- Support const values for `target` and `name` ([#2941]) 14 15### Documented 16 17- Fix backporting error in attributes ([#2780]) 18 19[#2780]: https://github.com/tokio-rs/tracing/pull/2780 20[#2781]: https://github.com/tokio-rs/tracing/pull/2781 21[#2793]: https://github.com/tokio-rs/tracing/pull/2793 22[#2864]: https://github.com/tokio-rs/tracing/pull/2864 23[#2880]: https://github.com/tokio-rs/tracing/pull/2880 24[#2925]: https://github.com/tokio-rs/tracing/pull/2925 25[#2941]: https://github.com/tokio-rs/tracing/pull/2941 26 27# 0.1.27 (October 13, 2023) 28 29### Changed 30 31- Bump minimum version of proc-macro2 to 1.0.60 ([#2732]) 32- Generate less dead code for async block return type hint ([#2709]) 33 34### Fixed 35 36- Fix a compilation error in `#[instrument]` when the `"log"` feature is enabled ([#2599]) 37 38[#2732]: https://github.com/tokio-rs/tracing/pull/2732 39[#2709]: https://github.com/tokio-rs/tracing/pull/2709 40[#2599]: https://github.com/tokio-rs/tracing/pull/2599 41 42# 0.1.26 (June 21th, 2023) 43 44This release of `tracing-attributes` fixes warnings due to `allow` attributes in 45generated code that allow lints which may not exist on earlier versions of rustc. 46 47### Fixed 48 49- Allow `unknown_lints` in macro-generated code ([#2626]) 50 51Thanks to @mladedav for contributing to this release! 52 53# 0.1.25 (June 19th, 2023) 54 55This release of `tracing-attributes` fixes the Clippy lint 56[`let_with_type_underscore`] in code generated by the `#[instrument]` 57attribute in Rust 1.70+. 58 59### Fixed 60 61- Allow [`clippy::let_with_type_underscore`] in macro-generated code ([#2609]) 62 63Thanks to @coolreader19 for contributing to this release! 64 65[#2609]: https://github.com/tokio-rs/tracing/pull/2609 66 67[`let_with_type_underscore`]: http://rust-lang.github.io/rust-clippy/rust-1.70.0/index.html#let_with_type_underscore 68 69# 0.1.24 (April 24th, 2023) 70 71This release of `tracing-attributes` adds support for passing an optional 72`level` to the `err` and `ret` arguments to `#[instrument]`, allowing the level 73of the generated return-value event to be overridden. For example, 74 75```rust 76#[instrument(err(level = "info"))] 77fn my_great_function() -> Result<(), &'static str> { 78 // ... 79} 80``` 81 82will emit an `INFO`-level event if the function returns an `Err`. 83 84In addition, this release updates the [`syn`] dependency to v2.x.x. 85 86### Added 87 88- `level` argument to `err` and `ret` to override the level of the generated 89 return value event ([#2335]) 90- Improved compiler error message when `#[instrument]` is added to a `const fn` 91 ([#2418]) 92 93### Changed 94 95- Updated `syn` dependency to 2.0 ([#2516]) 96 97### Fixed 98 99- Fix `clippy::unreachable` warnings in `#[instrument]`-generated code ([#2356]) 100- Removed unused "visit" feature flag from `syn` dependency ([#2530]) 101 102### Documented 103 104- Documented default level for `err` ([#2433]) 105- Improved documentation for levels in `#[instrument]` ([#2350]) 106 107Thanks to @nitnelave, @jsgf, @Abhicodes-crypto, @LukeMathWalker, @andrewpollack, 108@quad, @klensy, @davidpdrsn, and @dbidwell94 for contributign to this release! 109 110[`syn`]: https://crates.io/crates/syn 111[#2335]: https://github.com/tokio-rs/tracing/pull/2335 112[#2418]: https://github.com/tokio-rs/tracing/pull/2418 113[#2516]: https://github.com/tokio-rs/tracing/pull/2516 114[#2356]: https://github.com/tokio-rs/tracing/pull/2356 115[#2530]: https://github.com/tokio-rs/tracing/pull/2530 116[#2433]: https://github.com/tokio-rs/tracing/pull/2433 117[#2350]: https://github.com/tokio-rs/tracing/pull/2350 118 119# 0.1.23 (October 6, 2022) 120 121This release of `tracing-attributes` fixes a bug where compiler diagnostic spans 122for type errors in `#[instrument]`ed `async fn`s have the location of the 123`#[instrument]` attribute rather than the location of the actual error, and a 124bug where inner attributes in `#[instrument]`ed functions would cause a compiler 125error. 126 127### Fixed 128 129- Fix incorrect handling of inner attributes in `#[instrument]`ed functions ([#2307]) 130- Add fake return to improve spans generated for type errors in `async fn`s ([#2270]) 131- Updated `syn` dependency to fix compilation with `-Z minimal-versions` 132 ([#2246]) 133 134Thanks to new contributors @compiler-errors and @e-nomem, as well as @CAD97, for 135contributing to this release! 136 137[#2307]: https://github.com/tokio-rs/tracing/pull/2307 138[#2270]: https://github.com/tokio-rs/tracing/pull/2270 139[#2246]: https://github.com/tokio-rs/tracing/pull/2246 140 141# 0.1.22 (July 1, 2022) 142 143This release fixes an issue where using the `err` or `ret` arguments to 144`#[instrument]` along with an overridden target, such as 145 146```rust 147#[instrument(target = "...", err, ret)] 148``` 149 150would not propagate the overridden target to the events generated for 151errors/return values. 152 153### Fixed 154 155- Error and return value events generated by `#[instrument(err)]` or 156 `#[instrument(ret)]` not inheriting an overridden target ([#2184]) 157- Incorrect default level in documentation ([#2119]) 158 159Thanks to new contributor @tbraun96 for contributing to this release! 160 161[#2184]: https://github.com/tokio-rs/tracing/pull/2184 162[#2119]: https://github.com/tokio-rs/tracing/pull/2119 163 164# 0.1.21 (April 26, 2022) 165 166This release adds support for setting explicit parent and follows-from spans 167in the `#[instrument]` attribute. 168 169### Added 170 171- `#[instrument(follows_from = ...)]` argument for setting one or more 172 follows-from span ([#2093]) 173- `#[instrument(parent = ...)]` argument for overriding the generated span's 174 parent ([#2091]) 175 176### Fixed 177 178- Extra braces around `async` blocks in expanded code (causes a Clippy warning) 179 ([#2090]) 180- Broken documentation links ([#2068], [#2077]) 181 182Thanks to @jarrodldavis, @ben0x539, and new contributor @jswrenn for 183contributing to this release! 184 185 186[#2093]: https://github.com/tokio-rs/tracing/pull/2093 187[#2091]: https://github.com/tokio-rs/tracing/pull/2091 188[#2090]: https://github.com/tokio-rs/tracing/pull/2090 189[#2077]: https://github.com/tokio-rs/tracing/pull/2077 190[#2068]: https://github.com/tokio-rs/tracing/pull/2068 191 192# 0.1.20 (March 8, 2022) 193 194### Fixed 195 196- Compilation failure with `--minimal-versions` due to a too-permissive `syn` 197 dependency ([#1960]) 198 199### Changed 200 201- Bumped minimum supported Rust version (MSRV) to 1.49.0 ([#1913]) 202 203Thanks to new contributor @udoprog for contributing to this release! 204 205[#1960]: https://github.com/tokio-rs/tracing/pull/1960 206[#1913]: https://github.com/tokio-rs/tracing/pull/1913 207 208# 0.1.19 (February 3, 2022) 209 210This release introduces a new `#[instrument(ret)]` argument to emit an event 211with the return value of an instrumented function. 212 213### Added 214 215- `#[instrument(ret)]` to record the return value of a function ([#1716]) 216- added `err(Debug)` argument to cause `#[instrument(err)]` to record errors 217 with `Debug` rather than `Display ([#1631]) 218 219### Fixed 220 221- incorrect code generation for functions returning async blocks ([#1866]) 222- incorrect diagnostics when using `rust-analyzer` ([#1634]) 223 224Thanks to @Swatinem, @hkmatsumoto, @cynecx, and @ciuncan for contributing to 225this release! 226 227[#1716]: https://github.com/tokio-rs/tracing/pull/1716 228[#1631]: https://github.com/tokio-rs/tracing/pull/1631 229[#1634]: https://github.com/tokio-rs/tracing/pull/1634 230[#1866]: https://github.com/tokio-rs/tracing/pull/1866 231 232# 0.1.18 (October 5, 2021) 233 234This release fixes issues introduced in v0.1.17. 235 236### Fixed 237 238- fixed mismatched types compiler error that may occur when using 239 `#[instrument]` on an `async fn` that returns an `impl Trait` value that 240 includes a closure ([#1616]) 241- fixed false positives for `clippy::suspicious_else_formatting` warnings due to 242 rust-lang/rust-clippy#7760 and rust-lang/rust-clippy#6249 ([#1617]) 243- fixed `clippy::let_unit_value` lints when using `#[instrument]` ([#1614]) 244 245[#1617]: https://github.com/tokio-rs/tracing/pull/1617 246[#1616]: https://github.com/tokio-rs/tracing/pull/1616 247[#1614]: https://github.com/tokio-rs/tracing/pull/1614 248 249# 0.1.17 (YANKED) (October 1, 2021) 250 251This release significantly improves performance when `#[instrument]`-generated 252spans are below the maximum enabled level. 253 254### Added 255 256- improve performance when skipping `#[instrument]`-generated spans below the 257 max level ([#1600], [#1605]) 258 259Thanks to @oli-obk for contributing to this release! 260 261[#1600]: https://github.com/tokio-rs/tracing/pull/1600 262[#1605]: https://github.com/tokio-rs/tracing/pull/1605 263 264# 0.1.16 (September 13, 2021) 265 266This release adds a new `#[instrument(skip_all)]` option to skip recording *all* 267arguments to an instrumented function as fields. Additionally, it adds support 268for recording arguments that are `tracing` primitive types as typed values, 269rather than as `fmt::Debug`. 270 271### Added 272 273- add `skip_all` option to `#[instrument]` ([#1548]) 274- record primitive types as primitive values rather than as `fmt::Debug` 275 ([#1378]) 276- added support for `f64`s as typed values ([#1522]) 277 278Thanks to @Folyd and @jsgf for contributing to this release! 279 280[#1548]: https://github.com/tokio-rs/tracing/pull/1548 281[#1378]: https://github.com/tokio-rs/tracing/pull/1378 282[#1522]: https://github.com/tokio-rs/tracing/pull/1524 283 284# 0.1.15 (March 12, 2021) 285 286### Fixed 287 288- `#[instrument]` on functions returning `Box::pin`ned futures incorrectly 289 skipping function bodies prior to returning a future ([#1297]) 290 291Thanks to @nightmared for contributing to this release! 292 293[#1297]: https://github.com/tokio-rs/tracing/pull/1297 294 295# 0.1.14 (March 10, 2021) 296 297### Fixed 298 299- Compatibility between `#[instrument]` and `async-trait` v0.1.43 and newer 300 ([#1228]) 301 302Thanks to @nightmared for lots of hard work on this fix! 303 304[#1228]: https://github.com/tokio-rs/tracing/pull/1228 305 306# 0.1.13 (February 17, 2021) 307 308### Fixed 309 310- Compiler error when using `#[instrument(err)]` on functions which return `impl 311 Trait` ([#1236]) 312 313[#1236]: https://github.com/tokio-rs/tracing/pull/1236 314 315# 0.1.12 (February 4, 2021) 316 317### Fixed 318 319- Compiler error when using `#[instrument(err)]` on functions with mutable 320 parameters ([#1167]) 321- Missing function visibility modifier when using `#[instrument]` with 322 `async-trait` ([#977]) 323- Multiple documentation fixes and improvements ([#965], [#981], [#1215]) 324 325### Changed 326 327- `tracing-futures` dependency is no longer required when using `#[instrument]` 328 on async functions ([#808]) 329 330Thanks to @nagisa, @Txuritan, @TaKO8Ki, and @okready for contributing to this 331release! 332 333[#1167]: https://github.com/tokio-rs/tracing/pull/1167 334[#977]: https://github.com/tokio-rs/tracing/pull/977 335[#965]: https://github.com/tokio-rs/tracing/pull/965 336[#981]: https://github.com/tokio-rs/tracing/pull/981 337[#1215]: https://github.com/tokio-rs/tracing/pull/1215 338[#808]: https://github.com/tokio-rs/tracing/pull/808 339 340# 0.1.11 (August 18, 2020) 341 342### Fixed 343 344- Corrected wrong minimum supported Rust version note in docs (#941) 345- Removed unused `syn` features (#928) 346 347Thanks to new contributor @jhpratt for contributing to this release! 348 349# 0.1.10 (August 10, 2020) 350 351### Added 352 353- Support for using `self` in field expressions when instrumenting `async-trait` 354 functions (#875) 355- Several documentation improvements (#832, #897, #911, #913) 356 357Thanks to @anton-dutov and @nightmared for contributing to this release! 358 359# 0.1.9 (July 8, 2020) 360 361### Added 362 363- Support for arbitrary expressions as fields in `#[instrument]` (#672) 364 365### Changed 366 367- `#[instrument]` now emits a compiler warning when ignoring unrecognized 368 input (#672, #786) 369 370# 0.1.8 (May 13, 2020) 371 372### Added 373 374- Support for using `#[instrument]` on methods that are part of [`async-trait`] 375 trait implementations (#711) 376- Optional `#[instrument(err)]` argument to automatically emit an event if an 377 instrumented function returns `Err` (#637) 378 379Thanks to @ilana and @nightmared for contributing to this release! 380 381[`async-trait`]: https://crates.io/crates/async-trait 382 383# 0.1.7 (February 26, 2020) 384 385### Added 386 387- Support for adding arbitrary literal fields to spans generated by 388 `#[instrument]` (#569) 389- `#[instrument]` now emits a helpful compiler error when attempting to skip a 390 function parameter (#600) 391 392Thanks to @Kobzol for contributing to this release! 393 394# 0.1.6 (December 20, 2019) 395 396### Added 397 398- Updated documentation (#468) 399 400# 0.1.5 (October 22, 2019) 401 402### Added 403 404- Support for destructuring in arguments to `#[instrument]`ed functions (#397) 405- Generated field for `self` parameters when `#[instrument]`ing methods (#397) 406 407# 0.1.4 (September 26, 2019) 408 409### Added 410 411- Optional `skip` argument to `#[instrument]` for excluding function parameters 412 from generated spans (#359) 413 414# 0.1.3 (September 12, 2019) 415 416### Fixed 417 418- Fixed `#[instrument]`ed async functions not compiling on `nightly-2019-09-11` 419 or newer (#342) 420 421# 0.1.2 (August 19, 2019) 422 423### Changed 424 425- Updated `syn` and `quote` dependencies to 1.0 (#292) 426- Removed direct dependency on `proc-macro2` to avoid potential version 427 conflicts (#296) 428 429### Fixed 430 431- Outdated idioms in examples (#271, #273) 432 433# 0.1.1 (August 9, 2019) 434 435### Changed 436 437- Using the `#[instrument]` attribute on `async fn`s no longer requires a 438 feature flag (#258) 439 440### Fixed 441 442- The `#[instrument]` macro now works on generic functions (#262) 443 444# 0.1.0 (August 8, 2019) 445 446- Initial release 447