From 463b699377d59cf1a03fd8380daca68f5c66e0e2 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/subscriber.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tracing/src/subscriber.rs b/tracing/src/subscriber.rs index 343dc5914c..f55698d13f 100644 --- a/tracing/src/subscriber.rs +++ b/tracing/src/subscriber.rs @@ -5,12 +5,12 @@ pub use tracing_core::subscriber::*; #[cfg_attr(docsrs, doc(cfg(feature = "std")))] pub use tracing_core::dispatcher::DefaultGuard; -/// Sets this subscriber as the default for the duration of a closure. +/// Sets this [`Subscriber`] as the default for the current thread for the +/// duration of a closure. /// /// The default subscriber 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 subscriber that -/// tagged that span, instead. +/// [`Event`]. +/// /// /// [`Span`]: super::span::Span /// [`Subscriber`]: super::subscriber::Subscriber @@ -43,13 +43,10 @@ where crate::dispatcher::set_global_default(crate::Dispatch::new(subscriber)) } -/// Sets the subscriber as the default for the duration of the lifetime of the -/// returned [`DefaultGuard`] +/// Sets the [`Subscriber`] as the default for the current thread for the +/// duration of the lifetime of the returned [`DefaultGuard`]. /// -/// The default subscriber 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 subscriber that -/// tagged that span, instead. +/// The default subscriber is used when creating a new [`Span`] or [`Event`]. /// /// [`Span`]: super::span::Span /// [`Subscriber`]: super::subscriber::Subscriber