pub struct Layers { /* private fields */ }Available on crate feature
std only.Expand description
Manages the collection of layers for a tracing subscriber.
Layers acts as a container for different logging layers such as stdout, file, or journald.
Each layer can be configured separately and then combined into a tracing subscriber.
Implementations§
Source§impl Layers
impl Layers
Sourcepub fn with_span_layer(
&mut self,
otlp_config: OtlpConfig,
filter: EnvFilter,
) -> Result<()>
Available on crate feature otlp only.
pub fn with_span_layer( &mut self, otlp_config: OtlpConfig, filter: EnvFilter, ) -> Result<()>
otlp only.Add OTLP spans layer to the layer collection
Sourcepub fn with_log_layer(
&mut self,
otlp_config: OtlpLogsConfig,
filter: EnvFilter,
) -> Result<()>
Available on crate feature otlp-logs only.
pub fn with_log_layer( &mut self, otlp_config: OtlpLogsConfig, filter: EnvFilter, ) -> Result<()>
otlp-logs only.Add OTLP logs layer to the layer collection
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Layers
impl !UnwindSafe for Layers
impl Freeze for Layers
impl Send for Layers
impl Sync for Layers
impl Unpin for Layers
impl UnsafeUnpin for Layers
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes