-
Notifications
You must be signed in to change notification settings - Fork 731
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
Make tracing_subscriber::span::{Data, Store, etc}
public
#505
Comments
@anp If I'm not mistaken, the |
Huzzah! I think this is perfect actually, I would like all of my code to live in layers and to have the subscriber just act as the registry. I'm tempted to rephrase this as a docs/tutorial request but I'm not well-versed enough in the subscriber crate yet to know where would be the best place. |
@anp you're right, this does need to be documented and it's not yet documented. it really does. |
Depends on #564 This commit adds a new section to the `Layer` docs on how `Layer`s and `Subscriber`s are composed. Additionally, it updates the docs to prefer the use of `SubscriberExt::with` over `Layer::with_subscriber`. Additionally, I've fixed how `SubscriberExt::with` is implemented, so that `Layer`s may use `with_subscriber` as a callback for composition. Closes #452 Closes #505 (IMO)
Feature Request
Crates
tracing-subscriber
Motivation
I'm implementing a
Subscriber
similar toFormatter
in many ways and would like to reuse the span allocation it makes use of inspan::Store
.Proposal
Is it safe to expose these types as directly usable? That would probably be my preference to avoid having to implement my own slab/locking/etc setup.
Alternatives
Is it possible to imagine a version of the crate where all I/O is done in layers separately from the span and metadata management?
Maybe Subscriber could be blanket impl'd for structs that implement some smaller trait, named something like
Storage
?The text was updated successfully, but these errors were encountered: