Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Make the usage of tracing spans more visible #82

Open
ghost opened this issue Apr 22, 2021 · 0 comments
Open

Make the usage of tracing spans more visible #82

ghost opened this issue Apr 22, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ghost
Copy link

ghost commented Apr 22, 2021

From examples/theme_test_helper.rs:

//! Nothing interesting here. This is just a small helper used in a test.

I beg to differ 😄

Using color-eyre along with the span+guard pattern:

let span = tracing::info_span!("my_span", msg);
let _guard = span.enter();

For me gives the best error reporting I have found as of yet in Rust.
(I wish it was a bit more ergonomic to set up though).

I realize this might fall into the domain of tracing more than color-eyre (?), but
I think it's so useful an example highlighting it would be very welcome.

@yaahc yaahc added documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed labels Feb 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant