Skip to content

Commit af36ba5

Browse files
matkladhawkw
andcommitted
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 <[email protected]>
1 parent 0af3a31 commit af36ba5

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

tracing/src/subscriber.rs

+7-10
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ pub use tracing_core::subscriber::*;
55
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
66
pub use tracing_core::dispatcher::DefaultGuard;
77

8-
/// Sets this subscriber as the default for the duration of a closure.
8+
/// Sets this [`Subscriber`] as the default for the current thread for the
9+
/// duration of a closure.
910
///
1011
/// The default subscriber is used when creating a new [`Span`] or
11-
/// [`Event`], _if no span is currently executing_. If a span is currently
12-
/// executing, new spans or events are dispatched to the subscriber that
13-
/// tagged that span, instead.
12+
/// [`Event`].
13+
///
1414
///
1515
/// [`Span`]: super::span::Span
1616
/// [`Subscriber`]: super::subscriber::Subscriber
@@ -43,13 +43,10 @@ where
4343
crate::dispatcher::set_global_default(crate::Dispatch::new(subscriber))
4444
}
4545

46-
/// Sets the subscriber as the default for the duration of the lifetime of the
47-
/// returned [`DefaultGuard`]
46+
/// Sets the [`Subscriber`] as the default for the current thread for the
47+
/// duration of the lifetime of the returned [`DefaultGuard`].
4848
///
49-
/// The default subscriber is used when creating a new [`Span`] or
50-
/// [`Event`], _if no span is currently executing_. If a span is currently
51-
/// executing, new spans or events are dispatched to the subscriber that
52-
/// tagged that span, instead.
49+
/// The default subscriber is used when creating a new [`Span`] or [`Event`].
5350
///
5451
/// [`Span`]: super::span::Span
5552
/// [`Subscriber`]: super::subscriber::Subscriber

0 commit comments

Comments
 (0)