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