mirror of
https://github.com/tokio-rs/tracing.git
synced 2026-03-27 10:00:23 +00:00
The version of `WithSubscriber` in `tracing::instrument` (rather than in `tracing-futures`) is currently...useless, since there is no `Future` impl for the `WithDispatch` type. This means that calling `with_collector` on a `Future` returns a value that _isn't_ a `Future`. Additionally, the `WithSubscriber` trait isn't actually implemented for anything (although this was fixed on v0.1.x). This branch adds the missing implementations. I also improved the docs a bit. Note that the `Future` impl requires the "std" feature flag, but the `WithSubscriber` trait and `WithDispatch` type do not. This is because requiring the feature flag for these definitions would *technically* be a breaking change, since they were previously published without the feature flag and could e.g. be imported...even though they were totally useless. Sigh. Signed-off-by: Eliza Weisman <eliza@buoyant.io> ; Conflicts: ; tracing/src/instrument.rs