Debian Codegraph @

third_party/rust/tracing-attributes/CHANGELOG.md

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