1# 0.1.29 (October 5th, 2021
2
3This release adds support for recording `Option<T> where T: Value` as typed
4`tracing` field values. It also includes significant performance improvements
5for functions annotated with the `#[instrument]` attribute when the generated
6span is disabled.
7
8### Changed
9
10- `tracing-core`: updated to v0.1.21
11- `tracing-attributes`: updated to v0.1.19
12
13### Added
14
15- **field**: `Value` impl for `Option<T> where T: Value` ([#1585])
16- **attributes**: - improved performance when skipping `#[instrument]`-generated
17  spans below the max level ([#1600], [#1605], [#1614], [#1616], [#1617])
18
19### Fixed
20
21- **instrument**: added missing `Future` implementation for `WithSubscriber`,
22  making the `WithDispatch` extension trait actually useable ([#1602])
23- Documentation fixes and improvements ([#1595], [#1601], [#1597])
24
25Thanks to @brianburgers, @mattiast, @DCjanus, @oli-obk, and @matklad for
26contributing to this release!
27
28[#1585]: https://github.com/tokio-rs/tracing/pull/1585
29[#1595]: https://github.com/tokio-rs/tracing/pull/1596
30[#1597]: https://github.com/tokio-rs/tracing/pull/1597
31[#1600]: https://github.com/tokio-rs/tracing/pull/1600
32[#1601]: https://github.com/tokio-rs/tracing/pull/1601
33[#1602]: https://github.com/tokio-rs/tracing/pull/1602
34[#1605]: https://github.com/tokio-rs/tracing/pull/1605
35[#1614]: https://github.com/tokio-rs/tracing/pull/1614
36[#1616]: https://github.com/tokio-rs/tracing/pull/1616
37[#1617]: https://github.com/tokio-rs/tracing/pull/1617
38
39# 0.1.28 (September 17th, 2021)
40
41This release fixes an issue where the RustDoc documentation was rendered
42incorrectly. It doesn't include any actual code changes, and is very boring and
43can be ignored.
44
45### Fixed
46
47- **docs**: Incorrect documentation rendering due to unclosed `<div>` tag
48  ([#1572])
49
50[#1572]: https://github.com/tokio-rs/tracing/pull/1572
51
52# 0.1.27 (September 13, 2021)
53
54This release adds a new [`Span::or_current`] method to aid in efficiently
55propagating span contexts to spawned threads or tasks. Additionally, it updates
56the [`tracing-core`] version to [0.1.20] and the [`tracing-attributes`] version to
57[0.1.16], ensuring that a number of new features in those crates are present.
58
59### Fixed
60
61- **instrument**: Added missing `WithSubscriber` implementations for futures and
62  other types ([#1424])
63
64### Added
65
66- `Span::or_current` method, to help with efficient span context propagation
67  ([#1538])
68- **attributes**: add `skip_all` option to `#[instrument]` ([#1548])
69- **attributes**: record primitive types as primitive values rather than as
70  `fmt::Debug` ([#1378])
71- **core**: `NoSubscriber`, a no-op `Subscriber` implementation
72  ([#1549])
73- **core**: Added `Visit::record_f64` and support for recording floating-point
74  values ([#1507], [#1522])
75- A large number of documentation improvements and fixes ([#1369], [#1398],
76  [#1435], [#1442], [#1524], [#1556])
77
78Thanks to new contributors @dzvon and @mbergkvist, as well as @teozkr,
79@maxburke, @LukeMathWalker, and @jsgf, for contributing to this
80release!
81
82[`Span::or_current`]: https://docs.rs/tracing/0.1.27/tracing/struct.Span.html#method.or_current
83[`tracing-core`]: https://crates.io/crates/tracing-core
84[`tracing-attributes`]: https://crates.io/crates/tracing-attributes
85[`tracing-core`]: https://crates.io/crates/tracing-core
86[0.1.20]: https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.20
87[0.1.16]: https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.16
88[#1424]: https://github.com/tokio-rs/tracing/pull/1424
89[#1538]: https://github.com/tokio-rs/tracing/pull/1538
90[#1548]: https://github.com/tokio-rs/tracing/pull/1548
91[#1378]: https://github.com/tokio-rs/tracing/pull/1378
92[#1507]: https://github.com/tokio-rs/tracing/pull/1507
93[#1522]: https://github.com/tokio-rs/tracing/pull/1522
94[#1369]: https://github.com/tokio-rs/tracing/pull/1369
95[#1398]: https://github.com/tokio-rs/tracing/pull/1398
96[#1435]: https://github.com/tokio-rs/tracing/pull/1435
97[#1442]: https://github.com/tokio-rs/tracing/pull/1442
98[#1524]: https://github.com/tokio-rs/tracing/pull/1524
99[#1556]: https://github.com/tokio-rs/tracing/pull/1556
100
101# 0.1.26 (April 30, 2021)
102
103### Fixed
104
105- **attributes**: Compatibility between `#[instrument]` and `async-trait`
106  v0.1.43 and newer ([#1228])
107- Several documentation fixes ([#1305], [#1344])
108### Added
109
110- `Subscriber` impl for `Box<dyn Subscriber + Send + Sync + 'static>` ([#1358])
111- `Subscriber` impl for `Arc<dyn Subscriber + Send + Sync + 'static>` ([#1374])
112- Symmetric `From` impls for existing `Into` impls on `span::Current`, `Span`,
113  and `Option<Id>` ([#1335], [#1338])
114- `From<EnteredSpan>` implementation for `Option<Id>`, allowing `EnteredSpan` to
115  be used in a `span!` macro's `parent:` field ([#1325])
116- `Attributes::fields` accessor that returns the set of fields defined on a
117  span's `Attributes` ([#1331])
118
119
120Thanks to @Folyd, @nightmared, and new contributors @rmsc and @Fishrock123 for
121contributing to this release!
122
123[#1227]: https://github.com/tokio-rs/tracing/pull/1228
124[#1305]: https://github.com/tokio-rs/tracing/pull/1305
125[#1325]: https://github.com/tokio-rs/tracing/pull/1325
126[#1338]: https://github.com/tokio-rs/tracing/pull/1338
127[#1344]: https://github.com/tokio-rs/tracing/pull/1344
128[#1358]: https://github.com/tokio-rs/tracing/pull/1358
129[#1374]: https://github.com/tokio-rs/tracing/pull/1374
130[#1335]: https://github.com/tokio-rs/tracing/pull/1335
131[#1331]: https://github.com/tokio-rs/tracing/pull/1331
132
133# 0.1.25 (February 23, 2021)
134
135### Added
136
137- `Span::entered` method for entering a span and moving it into a guard by value
138  rather than borrowing it ([#1252])
139
140Thanks to @matklad for contributing to this release!
141
142[#1252]: https://github.com/tokio-rs/tracing/pull/1252
143
144# 0.1.24 (February 17, 2021)
145
146### Fixed
147
148- **attributes**: Compiler error when using `#[instrument(err)]` on functions
149  which return `impl Trait` ([#1236])
150- Fixed broken match arms in event macros ([#1239])
151- Documentation improvements ([#1232])
152
153Thanks to @bkchr and @lfranke for contributing to this release!
154
155[#1236]: https://github.com/tokio-rs/tracing/pull/1236
156[#1239]: https://github.com/tokio-rs/tracing/pull/1239
157[#1232]: https://github.com/tokio-rs/tracing/pull/1232
158
159# 0.1.23 (February 4, 2021)
160
161### Fixed
162
163- **attributes**: Compiler error when using `#[instrument(err)]` on functions
164  with mutable parameters ([#1167])
165- **attributes**: Missing function visibility modifier when using
166  `#[instrument]` with `async-trait` ([#977])
167- **attributes** Removed unused `syn` features ([#928])
168- **log**: Fixed an issue where the `tracing` macros would generate code for
169  events whose levels are disabled statically by the `log` crate's
170  `static_max_level_XXX` features ([#1175])
171- Fixed deprecations and clippy lints ([#1195])
172- Several documentation fixes and improvements ([#941], [#965], [#981], [#1146],
173  [#1215])
174
175### Changed
176
177- **attributes**: `tracing-futures` dependency is no longer required when using
178  `#[instrument]` on async functions ([#808])
179- **attributes**: Updated `tracing-attributes` minimum dependency to v0.1.12
180  ([#1222])
181
182Thanks to @nagisa, @Txuritan, @TaKO8Ki, @okready, and @krojew for contributing
183to this release!
184
185[#1167]: https://github.com/tokio-rs/tracing/pull/1167
186[#977]: https://github.com/tokio-rs/tracing/pull/977
187[#965]: https://github.com/tokio-rs/tracing/pull/965
188[#981]: https://github.com/tokio-rs/tracing/pull/981
189[#1215]: https://github.com/tokio-rs/tracing/pull/1215
190[#808]: https://github.com/tokio-rs/tracing/pull/808
191[#941]: https://github.com/tokio-rs/tracing/pull/941
192[#1146]: https://github.com/tokio-rs/tracing/pull/1146
193[#1175]: https://github.com/tokio-rs/tracing/pull/1175
194[#1195]: https://github.com/tokio-rs/tracing/pull/1195
195[#1222]: https://github.com/tokio-rs/tracing/pull/1222
196
197# 0.1.22 (November 23, 2020)
198
199### Changed
200
201- Updated `pin-project-lite` dependency to 0.2 ([#1108])
202
203[#1108]: https://github.com/tokio-rs/tracing/pull/1108
204
205# 0.1.21 (September 28, 2020)
206
207### Fixed
208
209- Incorrect inlining of `Span::new`, `Span::new_root`, and `Span::new_child_of`,
210  which could result in  `dispatcher::get_default` being inlined at the callsite
211  ([#994])
212- Regression where using a struct field as a span or event field when other
213  fields on that struct are borrowed mutably would fail to compile ([#987])
214
215### Changed
216
217- Updated `tracing-core` to 0.1.17 ([#992])
218
219### Added
220
221- `Instrument` trait and `Instrumented` type for attaching a `Span` to a
222  `Future` ([#808])
223- `Copy` implementations for `Level` and `LevelFilter` ([#992])
224- Multiple documentation fixes and improvements ([#964], [#980], [#981])
225
226Thanks to @nagisa, and new contributors @SecurityInsanity, @froydnj, @jyn514 and
227@TaKO8Ki for contributing to this release!
228
229[#994]: https://github.com/tokio-rs/tracing/pull/994
230[#992]: https://github.com/tokio-rs/tracing/pull/992
231[#987]: https://github.com/tokio-rs/tracing/pull/987
232[#980]: https://github.com/tokio-rs/tracing/pull/980
233[#981]: https://github.com/tokio-rs/tracing/pull/981
234[#964]: https://github.com/tokio-rs/tracing/pull/964
235[#808]: https://github.com/tokio-rs/tracing/pull/808
236
237# 0.1.20 (August 24, 2020)
238
239### Changed
240
241- Significantly reduced assembly generated by macro invocations (#943)
242- Updated `tracing-core` to 0.1.15 (#943)
243
244### Added
245
246- Documented minimum supported Rust version policy (#941)
247
248# 0.1.19 (August 10, 2020)
249
250### Fixed
251
252- Updated `tracing-core` to fix incorrect calculation of the global max level
253  filter (#908)
254
255### Added
256
257- **attributes**: Support for using `self` in field expressions when
258  instrumenting `async-trait` functions (#875)
259- Several documentation improvements (#832, #881, #896, #897, #911, #913)
260
261Thanks to @anton-dutov, @nightmared, @mystor, and @toshokan for contributing to
262this release!
263
264# 0.1.18 (July 31, 2020)
265
266### Fixed
267
268- Fixed a bug where `LevelFilter::OFF` (and thus also the `static_max_level_off`
269  feature flag) would enable *all* traces, rather than *none* (#853)
270- **log**: Fixed `tracing` macros and `Span`s not checking `log::max_level`
271  before emitting `log` records (#870)
272
273### Changed
274
275- **macros**: Macros now check the global max level (`LevelFilter::current`)
276  before the per-callsite cache when determining if a span or event is enabled.
277  This significantly improves performance in some use cases (#853)
278- **macros**: Simplified the code generated by macro expansion significantly,
279  which may improve compile times and/or `rustc` optimizatation of surrounding
280  code (#869, #869)
281- **macros**: Macros now check the static max level before checking any runtime
282  filtering, improving performance when a span or event is disabled by a
283  `static_max_level_XXX` feature flag (#868)
284- `LevelFilter` is now a re-export of the `tracing_core::LevelFilter` type, it
285  can now be used interchangably with the versions in `tracing-core` and
286  `tracing-subscriber` (#853)
287- Significant performance improvements when comparing `LevelFilter`s and
288  `Level`s (#853)
289- Updated the minimum `tracing-core` dependency to 0.1.12 (#853)
290
291### Added
292
293- **macros**: Quoted string literals may now be used as field names, to allow
294  fields whose names are not valid Rust identifiers (#790)
295- **docs**: Several documentation improvements (#850, #857, #841)
296- `LevelFilter::current()` function, which returns the highest level that any
297  subscriber will enable (#853)
298- `Subscriber::max_level_hint` optional trait method, for setting the value
299  returned by `LevelFilter::current()` (#853)
300
301Thanks to new contributors @cuviper, @ethanboxx, @ben0x539, @dignati,
302@colelawrence, and @rbtcollins for helping out with this release!
303
304# 0.1.17 (July 22, 2020)
305
306### Changed
307
308- **log**: Moved verbose span enter/exit log records to "tracing::span::active"
309  target, allowing them to be filtered separately (#833)
310- **log**: All span lifecycle log records without fields now have the `Trace`
311  log filter, to guard against `log` users enabling them by default with blanket
312  level filtering (#833)
313
314### Fixed
315
316- **log**/**macros**: Fixed missing implicit imports of the
317  `tracing::field::debug` and `tracing::field::display` functions inside the
318  macros when the "log" feature is enabled (#835)
319
320# 0.1.16 (July 8, 2020)
321
322### Added
323
324- **attributes**: Support for arbitrary expressions as fields in `#[instrument]` (#672)
325- **attributes**: `#[instrument]` now emits a compiler warning when ignoring unrecognized
326  input (#672, #786)
327- Improved documentation on using `tracing` in async code (#769)
328
329### Changed
330
331- Updated `tracing-core` dependency to 0.1.11
332
333### Fixed
334
335- **macros**: Excessive monomorphization in macros, which could lead to
336  longer compilation times (#787)
337- **log**: Compiler warnings in macros when `log` or `log-always` features
338  are enabled (#753)
339- Compiler error when `tracing-core/std` feature is enabled but `tracing/std` is
340  not (#760)
341
342Thanks to @nagisa for contributing to this release!
343
344# 0.1.15 (June 2, 2020)
345
346### Changed
347
348- **macros**: Replaced use of legacy `local_inner_macros` with `$crate::` (#740)
349
350### Added
351
352- Docs fixes and improvements (#742, #731, #730)
353
354Thanks to @bnjjj, @blaenk, and @LukeMathWalker for contributing to this release!
355
356# 0.1.14 (May 14, 2020)
357
358### Added
359
360- **log**: When using the [`log`] compatibility feature alongside a `tracing`
361  `Subscriber`, log records for spans now include span IDs (#613)
362- **attributes**: Support for using `#[instrument]` on methods that are part of
363  [`async-trait`] trait implementations (#711)
364- **attributes**: Optional `#[instrument(err)]` argument to automatically emit
365  an event if an instrumented function returns `Err` (#637)
366- Added `#[must_use]` attribute to the guard returned by
367  `subscriber::set_default` (#685)
368
369### Changed
370
371- **log**: Made [`log`] records emitted by spans much less noisy when span IDs are
372 not available (#613)
373
374### Fixed
375
376- Several typos in the documentation (#656, #710, #715)
377
378Thanks to @FintanH, @shepmaster, @inanna-malick, @zekisharif, @bkchr, @majecty,
379@ilana and @nightmared for contributing to this release!
380
381[`async-trait`]: https://crates.io/crates/async-trait
382[`log`]: https://crates.io/crates/log
383
384# 0.1.13 (February 26, 2019)
385
386### Added
387
388- **field**: `field::Empty` type for declaring empty fields whose values will be
389  recorded later (#548)
390- **field**: `field::Value` implementations for `Wrapping` and `NonZero*`
391  numbers (#538)
392- **attributes**: Support for adding arbitrary literal fields to spans generated
393  by `#[instrument]` (#569)
394- **attributes**: `#[instrument]` now emits a helpful compiler error when
395  attempting to skip a function parameter (#600)
396
397### Changed
398
399- **attributes**: The `#[instrument]` attribute was placed under an on-by-default
400  feature flag "attributes" (#603)
401
402### Fixed
403
404- Broken and unresolvable links in RustDoc (#595)
405
406Thanks to @oli-cosmian and @Kobzol for contributing to this release!
407
408# 0.1.12 (January 11, 2019)
409
410### Added
411
412- `Span::with_subscriber` method to access the subscriber that tracks a `Span`
413  (#503)
414- API documentation now shows which features are required by feature-flagged
415  items (#523)
416- Improved README examples (#496)
417- Documentation links to related crates (#507)
418
419# 0.1.11 (December 20, 2019)
420
421### Added
422
423- `Span::is_none` method (#475)
424- `LevelFilter::into_level` method (#470)
425- `LevelFilter::from_level` function and `From<Level>` impl (#471)
426- Documented minimum supported Rust version (#482)
427
428### Fixed
429
430- Incorrect parameter type to `Span::follows_from` that made it impossible to
431  call (#467)
432- Missing whitespace in `log` records generated when enabling the `log` feature
433  flag (#484)
434- Typos and missing links in documentation (#405, #423, #439)
435
436# 0.1.10 (October 23, 2019)
437
438### Added
439
440- Support for destructuring in arguments to `#[instrument]`ed functions (#397)
441- Generated field for `self` parameters when `#[instrument]`ing methods (#397)
442- Optional `skip` argument to `#[instrument]` for excluding function parameters
443  from generated spans (#359)
444- Added `dispatcher::set_default` and `subscriber::set_default` APIs, which
445  return a drop guard (#388)
446
447### Fixed
448
449- Some minor documentation errors (#356, #370)
450
451# 0.1.9 (September 13, 2019)
452
453### Fixed
454
455- Fixed `#[instrument]`ed async functions not compiling on `nightly-2019-09-11`
456  or newer (#342)
457
458### Changed
459
460- Significantly reduced performance impact of skipped spans and events when a
461  `Subscriber` is not in use (#326)
462- The `log` feature will now only cause `tracing` spans and events to emit log
463  records when a `Subscriber` is not in use (#346)
464
465### Added
466
467- Added support for overriding the name of the span generated by `#[instrument]`
468  (#330)
469- `log-always` feature flag to emit log records even when a `Subscriber` is set
470  (#346)
471
472# 0.1.8 (September 3, 2019)
473
474### Changed
475
476- Reorganized and improved API documentation (#317)
477
478### Removed
479
480- Dev-dependencies on `ansi_term` and `humantime` crates, which were used only
481  for examples (#316)
482
483# 0.1.7 (August 30, 2019)
484
485### Changed
486
487- New (curly-brace free) event message syntax to place the message in the first
488  field rather than the last (#309)
489
490### Fixed
491
492- Fixed a regression causing macro stack exhaustion when the `log` feature flag
493  is enabled (#304)
494
495# 0.1.6 (August 20, 2019)
496
497### Added
498
499- `std::error::Error` as a new primitive type (#277)
500- Support for mixing key-value fields and `format_args` messages without curly
501  braces as delimiters (#288)
502
503### Changed
504
505- `tracing-core` dependency to 0.1.5 (#294)
506- `tracing-attributes` dependency to 0.1.2 (#297)
507
508# 0.1.5 (August 9, 2019)
509
510### Added
511
512- Support for `no-std` + `liballoc` (#263)
513
514### Changed
515
516- Using the `#[instrument]` attribute on `async fn`s no longer requires a
517  feature flag (#258)
518
519### Fixed
520
521- The `#[instrument]` macro now works on generic functions (#262)
522
523# 0.1.4 (August 8, 2019)
524
525### Added
526
527- `#[instrument]` attribute for automatically adding spans to functions (#253)
528
529# 0.1.3 (July 11, 2019)
530
531### Added
532
533- Log messages when a subscriber indicates that a span has closed, when the
534  `log` feature flag is enabled (#180).
535
536### Changed
537
538- `tracing-core` minimum dependency version to 0.1.2 (#174).
539
540### Fixed
541
542- Fixed an issue where event macro invocations with a single field, using local
543  variable shorthand, would recur infinitely (#166).
544- Fixed uses of deprecated `tracing-core` APIs (#174).
545
546# 0.1.2 (July 6, 2019)
547
548### Added
549
550- `Span::none()` constructor, which does not require metadata and
551  returns a completely empty span (#147).
552- `Span::current()` function, returning the current span if it is
553  known to the subscriber (#148).
554
555### Fixed
556
557- Broken macro imports when used prefixed with `tracing::` (#152).
558
559# 0.1.1 (July 3, 2019)
560
561### Changed
562
563- `cfg_if` dependency to 0.1.9.
564
565### Fixed
566
567- Compilation errors when the `log` feature is enabled (#131).
568- Unclear wording and typos in documentation (#124, #128, #142).
569
570# 0.1.0 (June 27, 2019)
571
572- Initial release
573