Struct tracing_distributed::TelemetryLayer[][src]

pub struct TelemetryLayer<Telemetry, SpanId, TraceId> { /* fields omitted */ }

A tracing_subscriber::Layer that publishes events and spans to some backend using the provided Telemetry capability.

Implementations

impl<T, SpanId, TraceId> TelemetryLayer<T, SpanId, TraceId> where
    SpanId: 'static + Clone + Send + Sync,
    TraceId: 'static + Clone + Send + Sync
[src]

pub fn new<F: 'static + Send + Sync + Fn(Id) -> SpanId>(
    service_name: &'static str,
    telemetry: T,
    promote_span_id: F
) -> Self
[src]

Construct a new TelemetryLayer using the provided Telemetry capability. Uses the provided function, F, to promote tracing::span::Id instances to the SpanId type associated with the provided Telemetry instance.

Trait Implementations

impl<S, TraceId, SpanId, V, T> Layer<S> for TelemetryLayer<T, SpanId, TraceId> where
    S: Subscriber + for<'a> LookupSpan<'a>,
    TraceId: 'static + Clone + Eq + Send + Sync,
    SpanId: 'static + Clone + Eq + Send + Sync,
    V: 'static + Visit + Send + Sync,
    T: 'static + Telemetry<Visitor = V, TraceId = TraceId, SpanId = SpanId>, 
[src]

Auto Trait Implementations

impl<Telemetry, SpanId, TraceId> !RefUnwindSafe for TelemetryLayer<Telemetry, SpanId, TraceId>

impl<Telemetry, SpanId, TraceId> Send for TelemetryLayer<Telemetry, SpanId, TraceId> where
    SpanId: Send,
    Telemetry: Send,
    TraceId: Send

impl<Telemetry, SpanId, TraceId> Sync for TelemetryLayer<Telemetry, SpanId, TraceId> where
    SpanId: Send + Sync,
    Telemetry: Sync,
    TraceId: Send + Sync

impl<Telemetry, SpanId, TraceId> Unpin for TelemetryLayer<Telemetry, SpanId, TraceId> where
    SpanId: Unpin,
    Telemetry: Unpin,
    TraceId: Unpin

impl<Telemetry, SpanId, TraceId> !UnwindSafe for TelemetryLayer<Telemetry, SpanId, TraceId>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.