666ae19efd8c9ef239a42ec47ee3cdadeac6b5e5
Span guards (i.e. `Span::enter`) cannot be used in asynchronous methods: > The drop guard returned by Span::enter exits the span when it is > dropped. When an async function or async block yields at an .await > point, the current scope is exited, but values in that scope are not > dropped (because the async block will eventually resume execution > from that await point). This means that another task will begin > executing while remaining in the entered span. This results in an > incorrect trace. https://docs.rs/tracing/0.1.41/tracing/span/struct.Span.html#in-asynchronous-code Instead, we can use the `instrument` attribute macro, which correctly instruments asynchronous functions. I originally did not use this macro because it logs all function parameters' values by default, which means every log line emitted while in the span contained the entire contents of the page being saved. Fortunately, I discovered you can omit certain parameters using `skip`.
Description
No description provided
Languages
Rust
93.1%
Shell
6.5%
Just
0.4%