summaryrefslogtreecommitdiffstats
path: root/vendor/tracing-subscriber-0.3.3/src/registry/sharded.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vendor/tracing-subscriber-0.3.3/src/registry/sharded.rs (renamed from vendor/tracing-subscriber/src/registry/sharded.rs)27
1 files changed, 15 insertions, 12 deletions
diff --git a/vendor/tracing-subscriber/src/registry/sharded.rs b/vendor/tracing-subscriber-0.3.3/src/registry/sharded.rs
index b81d5fef8..a6311cb71 100644
--- a/vendor/tracing-subscriber/src/registry/sharded.rs
+++ b/vendor/tracing-subscriber-0.3.3/src/registry/sharded.rs
@@ -75,16 +75,16 @@ use tracing_core::{
/// the distributed tracing system. These IDs can be associated with
/// `tracing` spans using [fields] and/or [stored span data].
///
-/// [span IDs]: tracing_core::span::Id
-/// [slab]: sharded_slab
+/// [span IDs]: https://docs.rs/tracing-core/latest/tracing_core/span/struct.Id.html
+/// [slab]: https://docs.rs/crate/sharded-slab/
/// [`Layer`]: crate::Layer
/// [added]: crate::layer::Layer#composing-layers
/// [extensions]: super::Extensions
/// [closed]: https://docs.rs/tracing/latest/tracing/span/index.html#closing-spans
-/// [considered closed]: tracing_core::subscriber::Subscriber::try_close()
+/// [considered closed]: https://docs.rs/tracing-core/latest/tracing_core/subscriber/trait.Subscriber.html#method.try_close
/// [`Span`]: https://docs.rs/tracing/latest/tracing/span/struct.Span.html
/// [ot]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#spancontext
-/// [fields]: tracing_core::field
+/// [fields]: https://docs.rs/tracing-core/latest/tracing-core/field/index.html
/// [stored span data]: crate::registry::SpanData::extensions_mut
#[cfg(feature = "registry")]
#[cfg_attr(docsrs, doc(cfg(all(feature = "registry", feature = "std"))))]
@@ -102,8 +102,9 @@ pub struct Registry {
/// [`Layer`s], such as formatted fields, metrics, or distributed traces should
/// be stored in the [extensions] typemap.
///
-/// [`Layer`s]: crate::layer::Layer
-/// [extensions]: Extensions
+/// [`Registry`]: struct.Registry.html
+/// [`Layer`s]: ../layer/trait.Layer.html
+/// [extensions]: struct.Extensions.html
#[cfg(feature = "registry")]
#[cfg_attr(docsrs, doc(cfg(all(feature = "registry", feature = "std"))))]
#[derive(Debug)]
@@ -114,11 +115,10 @@ pub struct Data<'a> {
/// Stored data associated with a span.
///
-/// This type is pooled using [`sharded_slab::Pool`]; when a span is
-/// dropped, the `DataInner` entry at that span's slab index is cleared
-/// in place and reused by a future span. Thus, the `Default` and
-/// [`sharded_slab::Clear`] implementations for this type are
-/// load-bearing.
+/// This type is pooled using `sharded_slab::Pool`; when a span is dropped, the
+/// `DataInner` entry at that span's slab index is cleared in place and reused
+/// by a future span. Thus, the `Default` and `sharded_slab::Clear`
+/// implementations for this type are load-bearing.
#[derive(Debug)]
struct DataInner {
filter_map: FilterMap,
@@ -173,6 +173,7 @@ fn id_to_idx(id: &Id) -> usize {
/// greater than 0, `CloseGuard` decrements the counter by one and
/// _does not_ remove the span from the [`Registry`].
///
+/// [`Registry`]: ./struct.Registry.html
pub(crate) struct CloseGuard<'a> {
id: Id,
registry: &'a Registry,
@@ -188,6 +189,7 @@ impl Registry {
/// processed an `on_close` notification via the `CLOSE_COUNT` thread-local.
/// For additional details, see [`CloseGuard`].
///
+ /// [`CloseGuard`]: ./struct.CloseGuard.html
pub(crate) fn start_close(&self, id: Id) -> CloseGuard<'_> {
CLOSE_COUNT.with(|count| {
let c = count.get();
@@ -214,6 +216,7 @@ thread_local! {
/// track how many layers have processed the close.
/// For additional details, see [`CloseGuard`].
///
+ /// [`CloseGuard`]: ./struct.CloseGuard.html
static CLOSE_COUNT: Cell<usize> = Cell::new(0);
}
@@ -377,7 +380,7 @@ impl<'a> LookupSpan<'a> for Registry {
// === impl CloseGuard ===
impl<'a> CloseGuard<'a> {
- pub(crate) fn set_closing(&mut self) {
+ pub(crate) fn is_closing(&mut self) {
self.is_closing = true;
}
}