summaryrefslogtreecommitdiffstats
path: root/vendor/tracing-subscriber/src/registry
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vendor/tracing-subscriber/src/registry/extensions.rs (renamed from vendor/tracing-subscriber-0.3.3/src/registry/extensions.rs)2
-rw-r--r--vendor/tracing-subscriber/src/registry/mod.rs (renamed from vendor/tracing-subscriber-0.3.3/src/registry/mod.rs)20
-rw-r--r--vendor/tracing-subscriber/src/registry/sharded.rs (renamed from vendor/tracing-subscriber-0.3.3/src/registry/sharded.rs)34
-rw-r--r--vendor/tracing-subscriber/src/registry/stack.rs (renamed from vendor/tracing-subscriber-0.3.3/src/registry/stack.rs)0
4 files changed, 28 insertions, 28 deletions
diff --git a/vendor/tracing-subscriber-0.3.3/src/registry/extensions.rs b/vendor/tracing-subscriber/src/registry/extensions.rs
index 899e1549f..ff76fb599 100644
--- a/vendor/tracing-subscriber-0.3.3/src/registry/extensions.rs
+++ b/vendor/tracing-subscriber/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`](https://doc.rust-lang.org/std/string/struct.String.html), to avoid accidental
+ /// types like [`String`](std::string::String), to avoid accidental
/// cross-`Layer` clobbering.
///
/// ## Panics
diff --git a/vendor/tracing-subscriber-0.3.3/src/registry/mod.rs b/vendor/tracing-subscriber/src/registry/mod.rs
index f3b77b6a9..38af53e8a 100644
--- a/vendor/tracing-subscriber-0.3.3/src/registry/mod.rs
+++ b/vendor/tracing-subscriber/src/registry/mod.rs
@@ -55,8 +55,7 @@
//! require the root subscriber to be a registry.
//!
//! [`Layer`]: crate::layer::Layer
-//! [`Subscriber`]:
-//! https://docs.rs/tracing-core/latest/tracing_core/subscriber/trait.Subscriber.html
+//! [`Subscriber`]: tracing_core::Subscriber
//! [ctx]: crate::layer::Context
//! [lookup]: crate::layer::Context::span()
use tracing_core::{field::FieldSet, span::Id, Metadata};
@@ -87,9 +86,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`]: ../layer/trait.Layer.html
-/// [`Context`]: ../layer/struct.Context.html
-/// [`span()`]: ../layer/struct.Context.html#method.span
+/// [`Layer`]: super::layer::Layer
+/// [`Context`]: super::layer::Context
+/// [`span()`]: super::layer::Context::span
pub trait LookupSpan<'a> {
/// The type of span data stored in this registry.
type Data: SpanData<'a>;
@@ -104,7 +103,6 @@ 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.
@@ -116,9 +114,7 @@ pub trait LookupSpan<'a> {
/// rather than the [`span_data`] method; while _implementors_ of this trait
/// should only implement `span_data`.
///
- /// [`SpanRef`]: struct.SpanRef.html
- /// [`SpanData`]: trait.SpanData.html
- /// [`span_data`]: #method.span_data
+ /// [`span_data`]: LookupSpan::span_data()
fn span(&'a self, id: &Id) -> Option<SpanRef<'_, Self>>
where
Self: Sized,
@@ -208,8 +204,8 @@ pub trait SpanData<'a> {
/// provides additional methods for querying the registry based on values from
/// the span.
///
-/// [span data]: trait.SpanData.html
-/// [registry]: trait.LookupSpan.html
+/// [span data]: SpanData
+/// [registry]: LookupSpan
#[derive(Debug)]
pub struct SpanRef<'a, R: LookupSpan<'a>> {
registry: &'a R,
@@ -360,7 +356,7 @@ where
/// Returns a list of [fields] defined by the span.
///
- /// [fields]: https://docs.rs/tracing-core/latest/tracing_core/field/index.html
+ /// [fields]: tracing_core::field
pub fn fields(&self) -> &FieldSet {
self.data.metadata().fields()
}
diff --git a/vendor/tracing-subscriber-0.3.3/src/registry/sharded.rs b/vendor/tracing-subscriber/src/registry/sharded.rs
index a6311cb71..797899767 100644
--- a/vendor/tracing-subscriber-0.3.3/src/registry/sharded.rs
+++ b/vendor/tracing-subscriber/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]: https://docs.rs/tracing-core/latest/tracing_core/span/struct.Id.html
-/// [slab]: https://docs.rs/crate/sharded-slab/
+/// [span IDs]: tracing_core::span::Id
+/// [slab]: 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]: https://docs.rs/tracing-core/latest/tracing_core/subscriber/trait.Subscriber.html#method.try_close
+/// [considered closed]: tracing_core::subscriber::Subscriber::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]: https://docs.rs/tracing-core/latest/tracing-core/field/index.html
+/// [fields]: tracing_core::field
/// [stored span data]: crate::registry::SpanData::extensions_mut
#[cfg(feature = "registry")]
#[cfg_attr(docsrs, doc(cfg(all(feature = "registry", feature = "std"))))]
@@ -102,9 +102,8 @@ pub struct Registry {
/// [`Layer`s], such as formatted fields, metrics, or distributed traces should
/// be stored in the [extensions] typemap.
///
-/// [`Registry`]: struct.Registry.html
-/// [`Layer`s]: ../layer/trait.Layer.html
-/// [extensions]: struct.Extensions.html
+/// [`Layer`s]: crate::layer::Layer
+/// [extensions]: Extensions
#[cfg(feature = "registry")]
#[cfg_attr(docsrs, doc(cfg(all(feature = "registry", feature = "std"))))]
#[derive(Debug)]
@@ -115,10 +114,11 @@ 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,7 +173,6 @@ 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,
@@ -189,7 +188,6 @@ 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();
@@ -216,7 +214,6 @@ 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);
}
@@ -278,6 +275,13 @@ impl Subscriber for Registry {
fn record_follows_from(&self, _span: &span::Id, _follows: &span::Id) {}
+ fn event_enabled(&self, _event: &Event<'_>) -> bool {
+ if self.has_per_layer_filters() {
+ return FilterState::event_enabled();
+ }
+ true
+ }
+
/// This is intentionally not implemented, as recording events
/// is the responsibility of layers atop of this registry.
fn event(&self, _: &Event<'_>) {}
@@ -380,7 +384,7 @@ impl<'a> LookupSpan<'a> for Registry {
// === impl CloseGuard ===
impl<'a> CloseGuard<'a> {
- pub(crate) fn is_closing(&mut self) {
+ pub(crate) fn set_closing(&mut self) {
self.is_closing = true;
}
}
diff --git a/vendor/tracing-subscriber-0.3.3/src/registry/stack.rs b/vendor/tracing-subscriber/src/registry/stack.rs
index 4a3f7e59d..4a3f7e59d 100644
--- a/vendor/tracing-subscriber-0.3.3/src/registry/stack.rs
+++ b/vendor/tracing-subscriber/src/registry/stack.rs