Struct sc_telemetry::TelemetryLayer [−][src]
pub struct TelemetryLayer(_);
Layer
that handles the logs for telemetries.
Implementations
impl TelemetryLayer
[src]
impl TelemetryLayer
[src]pub fn new(
buffer_size: Option<usize>,
telemetry_external_transport: Option<ExtTransport>
) -> Result<(Self, TelemetryWorker)>
[src][−]
buffer_size: Option<usize>,
telemetry_external_transport: Option<ExtTransport>
) -> Result<(Self, TelemetryWorker)>
Create a new TelemetryLayer
and TelemetryWorker
.
The buffer_size
defaults to 16.
The ExtTransport
is used in WASM contexts where we need some binding between the
networking provided by the operating system or environment and libp2p.
Important: Each individual call to
write
corresponds to one message. There is no internal buffering going on. In the context of WebSockets, eachwrite
must be one individual WebSockets frame.
Trait Implementations
impl<S> Layer<S> for TelemetryLayer where
S: Subscriber + for<'a> LookupSpan<'a>,
[src]
impl<S> Layer<S> for TelemetryLayer where
S: Subscriber + for<'a> LookupSpan<'a>,
[src]fn on_event(&self, event: &Event<'_>, ctx: Context<'_, S>)
[src][−]
pub fn register_callsite(
&self,
metadata: &'static Metadata<'static>
) -> Interest
[src][−]
&self,
metadata: &'static Metadata<'static>
) -> Interest
pub fn enabled(&self, metadata: &Metadata<'_>, ctx: Context<'_, S>) -> bool
[src][−]
pub fn new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
[src][−]
pub fn on_record(&self, _span: &Id, _values: &Record<'_>, _ctx: Context<'_, S>)
[src][−]
pub fn on_follows_from(&self, _span: &Id, _follows: &Id, _ctx: Context<'_, S>)
[src][−]
pub fn on_enter(&self, _id: &Id, _ctx: Context<'_, S>)
[src][−]
pub fn on_exit(&self, _id: &Id, _ctx: Context<'_, S>)
[src][−]
pub fn on_close(&self, _id: Id, _ctx: Context<'_, S>)
[src][−]
pub fn on_id_change(&self, _old: &Id, _new: &Id, _ctx: Context<'_, S>)
[src][−]
pub fn and_then<L>(self, layer: L) -> Layered<L, Self, S> where
L: Layer<S>,
[src][−]
L: Layer<S>,
pub fn with_subscriber(self, inner: S) -> Layered<Self, S, S>
[src][−]
Auto Trait Implementations
impl !RefUnwindSafe for TelemetryLayer
impl Send for TelemetryLayer
impl Sync for TelemetryLayer
impl Unpin for TelemetryLayer
impl !UnwindSafe for TelemetryLayer
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]