-
Notifications
You must be signed in to change notification settings - Fork 885
Rename tracing_subscriber::layer::Layer to something closer to Subscriber. #641
Copy link
Copy link
Closed
Labels
crate/coreRelated to the `tracing-core` crateRelated to the `tracing-core` cratecrate/subscriberRelated to the `tracing-subscriber` crateRelated to the `tracing-subscriber` cratecrate/tracingRelated to the `tracing` crateRelated to the `tracing` cratekind/rfcA request for comments to discuss future changesA request for comments to discuss future changesmeta/breakingThis is a breaking change, and should wait until the next breaking release.This is a breaking change, and should wait until the next breaking release.
Milestone
Metadata
Metadata
Assignees
Labels
crate/coreRelated to the `tracing-core` crateRelated to the `tracing-core` cratecrate/subscriberRelated to the `tracing-subscriber` crateRelated to the `tracing-subscriber` cratecrate/tracingRelated to the `tracing` crateRelated to the `tracing` cratekind/rfcA request for comments to discuss future changesA request for comments to discuss future changesmeta/breakingThis is a breaking change, and should wait until the next breaking release.This is a breaking change, and should wait until the next breaking release.
Feature Request
Crates
tracing-subscriberMotivation
"Layer" is a somewhat abstract name for describing what it is actually: a composable subscriber. Given the centrality of the
Subscribertrait and our direction to end-customers to use theLayertrait as much as possible, I think we should attempt to communicate the "subscriber"-ness ofLayerto end-users as much as possible. It would also align theLayertrait closer to the crate's name,tracing-subscriber.Proposal
(The process for renaming is relatively simple, so most of this proposal will focus on non-
tracing-corebreaking changes.) Here are a few options:tracing_core::SubscriberasCoreSubscriberintracing; renameLayertoSubscriber. Optionally, at some later point, breaktracing_coreand renameSubscribertoCoreSubscriber. In documentation, emphasize thatCoreSubscriberis low-level trait and thattracing_subscriber::Subscribershould be preferred whenever possible.LayertoComposableSubscriber. I'm not a fan of this option;ComposableSubscriberis a bit of a mouthful.Alternatives