[−][src]Struct tracing_subscriber::Registry
A shared, reusable store for spans.
A Registry
is a Subscriber
around which multiple Layer
s
implementing various behaviors may be added. Unlike other types
implementing Subscriber
Registry
does not actually record traces itself:
instead, it collects and stores span data that is exposed to any Layer
s
wrapping it through implementations of the LookupSpan
and
LookupMetadata
traits. The Registry
is responsible for storing span
metadata, recording relationships between spans, and tracking which spans
are active and whicb are closed. In addition, it provides a mechanism
Layer
s to store user-defined per-span data, called extensions, in the
registry. This allows Layer
-specific data to benefit from the Registry
's
high-performance concurrent storage.
This registry is implemented using a lock-free sharded slab, and is highly optimized for concurrent access.
Trait Implementations
impl<'a> LookupSpan<'a> for Registry
[src]
type Data = Data<'a>
The type of span data stored in this registry.
fn span_data(&'a self, id: &Id) -> Option<Self::Data>
[src]
fn span(&'a self, id: &Id) -> Option<SpanRef<Self>> where
Self: Sized,
[src]
Self: Sized,
impl Default for Registry
[src]
impl Debug for Registry
[src]
impl Subscriber for Registry
[src]
fn register_callsite(&self, _: &'static Metadata<'static>) -> Interest
[src]
fn enabled(&self, _: &Metadata) -> bool
[src]
fn new_span(&self, attrs: &Attributes) -> Id
[src]
fn record(&self, _: &Id, _: &Record)
[src]
This is intentionally not implemented, as recording fields on a span is the responsibility of layers atop of this registry.
fn record_follows_from(&self, _span: &Id, _follows: &Id)
[src]
fn event(&self, _: &Event)
[src]
This is intentionally not implemented, as recording events is the responsibility of layers atop of this registry.
fn enter(&self, id: &Id)
[src]
fn exit(&self, id: &Id)
[src]
fn clone_span(&self, id: &Id) -> Id
[src]
fn current_span(&self) -> Current
[src]
fn try_close(&self, id: Id) -> bool
[src]
Decrements the reference count of the span with the given id
, and
removes the span if it is zero.
The allocated span slot will be reused when a new span is created.
fn drop_span(&self, _id: Id)
[src]
unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()>
[src]
Auto Trait Implementations
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl !UnwindSafe for Registry
impl !RefUnwindSafe for Registry
Blanket Implementations
impl<S> SubscriberExt for S where
S: Subscriber,
[src]
S: Subscriber,
impl<L> LookupMetadata for L where
L: LookupSpan<'a>,
[src]
L: LookupSpan<'a>,
fn metadata(&Self, &Id) -> Option<&'static Metadata<'static>>
[src]
fn exists(&self, id: &Id) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,