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