mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-09-30 06:20:38 +00:00
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 <eliza@buoyant.io>
This commit is contained in:
parent
8fbdb1cd6b
commit
463b699377
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user