From 968dd0d0ee0ee1e55061c72a7572c0541d54775e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 14 Jul 2022 20:50:42 +0100 Subject: [PATCH] core: remove misleading dispatcher docs (#2220) There's no automated propagation of subscribers between spans, you have to do this manually. https://discord.com/channels/500028886025895936/997201342596657232/997210656677830778 Co-authored-by: Eliza Weisman --- tracing/src/collect.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tracing/src/collect.rs b/tracing/src/collect.rs index 79a6832d84..5630037f63 100644 --- a/tracing/src/collect.rs +++ b/tracing/src/collect.rs @@ -5,15 +5,13 @@ pub use tracing_core::collect::*; #[cfg_attr(docsrs, doc(cfg(feature = "std")))] pub use tracing_core::dispatch::DefaultGuard; -/// Sets this collector as the default for the duration of a closure. +/// Sets this collector as the default for the current thread for the duration +/// of a closure. /// /// The default collector is used when creating a new [`Span`] or -/// [`Event`], _if no span is currently executing_. If a span is currently -/// executing, new spans or events are dispatched to the collector that -/// tagged that span, instead. +/// [`Event`]. /// /// [`Span`]: super::span::Span -/// [`Collect`]: super::collect::Collect /// [`Event`]: tracing_core::Event #[cfg(feature = "std")] #[cfg_attr(docsrs, doc(cfg(feature = "std")))] @@ -43,13 +41,11 @@ where crate::dispatch::set_global_default(crate::Dispatch::new(collector)) } -/// Sets the collector as the default for the duration of the lifetime of the -/// returned [`DefaultGuard`] +/// Sets the collector as the default for the current thread for the duration of +/// the lifetime of the returned [`DefaultGuard`]. /// /// The default collector is used when creating a new [`Span`] or -/// [`Event`], _if no span is currently executing_. If a span is currently -/// executing, new spans or events are dispatched to the collector that -/// tagged that span, instead. +/// [`Event`]. /// /// [`Span`]: super::span::Span /// [`Event`]: tracing_core::Event