summaryrefslogtreecommitdiffstats
path: root/vendor/tracing-subscriber-0.3.3/src/registry
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vendor/tracing-subscriber-0.3.3/src/registry/extensions.rs (renamed from vendor/tracing-subscriber/src/registry/extensions.rs)2
-rw-r--r--vendor/tracing-subscriber-0.3.3/src/registry/mod.rs (renamed from vendor/tracing-subscriber/src/registry/mod.rs)20
-rw-r--r--vendor/tracing-subscriber-0.3.3/src/registry/sharded.rs (renamed from vendor/tracing-subscriber/src/registry/sharded.rs)27
-rw-r--r--vendor/tracing-subscriber-0.3.3/src/registry/stack.rs (renamed from vendor/tracing-subscriber/src/registry/stack.rs)0
4 files changed, 28 insertions, 21 deletions
diff --git a/vendor/tracing-subscriber/src/registry/extensions.rs b/vendor/tracing-subscriber-0.3.3/src/registry/extensions.rs
index ff76fb599..899e1549f 100644
--- a/vendor/tracing-subscriber/src/registry/extensions.rs
+++ b/vendor/tracing-subscriber-0.3.3/src/registry/extensions.rs
@@ -78,7 +78,7 @@ impl<'a> ExtensionsMut<'a> {
/// should be able to reuse timestamp _x_.
///
/// Therefore, extensions should generally be newtypes, rather than common
- /// types like [`String`](std::string::String), to avoid accidental
+ /// types like [`String`](https://doc.rust-lang.org/std/string/struct.String.html), to avoid accidental
/// cross-`Layer` clobbering.
///
/// ## Panics
diff --git a/vendor/tracing-subscriber/src/registry/mod.rs b/vendor/tracing-subscriber-0.3.3/src/registry/mod.rs
index 38af53e8a..f3b77b6a9 100644
--- a/vendor/tracing-subscriber/src/registry/mod.rs
+++ b/vendor/tracing-subscriber-0.3.3/src/registry/mod.rs
@@ -55,7 +55,8 @@
//! require the root subscriber to be a registry.
//!
//! [`Layer`]: crate::layer::Layer
-//! [`Subscriber`]: tracing_core::Subscriber
+//! [`Subscriber`]:
+//! https://docs.rs/tracing-core/latest/tracing_core/subscriber/trait.Subscriber.html
//! [ctx]: crate::layer::Context
//! [lookup]: crate::layer::Context::span()
use tracing_core::{field::FieldSet, span::Id, Metadata};
@@ -86,9 +87,9 @@ feature! {
/// implement this trait; if they do, any [`Layer`]s wrapping them can look up
/// metadata via the [`Context`] type's [`span()`] method.
///
-/// [`Layer`]: super::layer::Layer
-/// [`Context`]: super::layer::Context
-/// [`span()`]: super::layer::Context::span
+/// [`Layer`]: ../layer/trait.Layer.html
+/// [`Context`]: ../layer/struct.Context.html
+/// [`span()`]: ../layer/struct.Context.html#method.span
pub trait LookupSpan<'a> {
/// The type of span data stored in this registry.
type Data: SpanData<'a>;
@@ -103,6 +104,7 @@ pub trait LookupSpan<'a> {
/// capable of performing more sophisiticated queries.
/// </pre>
///
+ /// [`SpanData`]: trait.SpanData.html
fn span_data(&'a self, id: &Id) -> Option<Self::Data>;
/// Returns a [`SpanRef`] for the span with the given `Id`, if it exists.
@@ -114,7 +116,9 @@ pub trait LookupSpan<'a> {
/// rather than the [`span_data`] method; while _implementors_ of this trait
/// should only implement `span_data`.
///
- /// [`span_data`]: LookupSpan::span_data()
+ /// [`SpanRef`]: struct.SpanRef.html
+ /// [`SpanData`]: trait.SpanData.html
+ /// [`span_data`]: #method.span_data
fn span(&'a self, id: &Id) -> Option<SpanRef<'_, Self>>
where
Self: Sized,
@@ -204,8 +208,8 @@ pub trait SpanData<'a> {
/// provides additional methods for querying the registry based on values from
/// the span.
///
-/// [span data]: SpanData
-/// [registry]: LookupSpan
+/// [span data]: trait.SpanData.html
+/// [registry]: trait.LookupSpan.html
#[derive(Debug)]
pub struct SpanRef<'a, R: LookupSpan<'a>> {
registry: &'a R,
@@ -356,7 +360,7 @@ where
/// Returns a list of [fields] defined by the span.
///
- /// [fields]: tracing_core::field
+ /// [fields]: https://docs.rs/tracing-core/latest/tracing_core/field/index.html
pub fn fields(&self) -> &FieldSet {
self.data.metadata().fields()
}
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;
}
}
diff --git a/vendor/tracing-subscriber/src/registry/stack.rs b/vendor/tracing-subscriber-0.3.3/src/registry/stack.rs
index 4a3f7e59d..4a3f7e59d 100644
--- a/vendor/tracing-subscriber/src/registry/stack.rs
+++ b/vendor/tracing-subscriber-0.3.3/src/registry/stack.rs