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 14, 2022
1 parent 4f326d2 commit 968dd0d
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tracing/src/collect.rs
Expand Up @@ -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")))]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 968dd0d

Please sign in to comment.