Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tracing crate examples to log #706

Open
joshka opened this issue Nov 30, 2024 · 7 comments
Open

Add tracing crate examples to log #706

joshka opened this issue Nov 30, 2024 · 7 comments

Comments

@joshka
Copy link

joshka commented Nov 30, 2024

Actually adding the recipes is reasonably easy,. I note that the contribution guidelines say not to add new crates though.

I wonder if adding an "Alternatives" section to each recipe could be worth doing, or if this would be best done by adding a tracing version of each log recipe?

@AndyGauge
Copy link
Collaborator

I found a direct tie between the cookbook and the playground so I recommend any crate that is blessed.rs or top 100 and already in the playground. I checked top 100 and did not find tracing.

@joshka
Copy link
Author

joshka commented Dec 1, 2024

It's in blessed.rs, so that seems reasonable to add. I ask because I've seen comments on a few places (various discord, reddit posts etc.) about how approachable getting started in tracing can be. I wanted to contribute recipes for it.

I went down the rabbit hole of trying to understand the playground inclusion criteria. There's likely a lot of crates that deserve to be on the playground list but that are overshadowed by crates that are used internally by many other crates rather than used directly. It might be nice to fix that someday.

I'm going to add an extra section alongside the log section with tracing equivalents.

@joshka
Copy link
Author

joshka commented Dec 1, 2024

jamesgraves#2 is a start - useing the other repo code included from a cargo project approach. I'll move things over to this repo at some point once done (unless you end up instead merging that repo, which would be great).

@AndyGauge
Copy link
Collaborator

It's in blessed.rs

Then it is blessed by the cookbook.

@joshka
Copy link
Author

joshka commented Dec 3, 2024

I noticed that the version by @john-cd already has this in https://john-cd.com/rust_howto/categories/development-tools_debugging/tracing.html, so rather than re-inventing the wheel, I'd suggest incorporating / merging those changes back into the cookbook from https://github.com/john-cd/rust_howto/tree/main

@AndyGauge
Copy link
Collaborator

I see a difference in licensing, and it would take them opening a pr and making it CC0 for it to be allowed.

@john-cd
Copy link

john-cd commented Dec 3, 2024

@AndyGauge @joshka - all examples in my book are CC0. Feel free to copy them into the Rust Cookbook.

Note that there is a lot of stuff that is hidden from view in the book at this point - so check the GitHub.

For tracing examples: https://github.com/john-cd/rust_howto/tree/main/deps/tests/categories/development_tools_debugging

Just add a link to https://github.com/john-cd/rust_howto and https://john-cd.com/rust_howto/ somewhere!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants