Skip to content

Commit

Permalink
core: remove misleading dispatcher docs (#2220)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
matklad and hawkw committed Jul 20, 2022
1 parent 8fbdb1c commit 463b699
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions tracing/src/subscriber.rs
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 463b699

Please sign in to comment.