Trait TraceRuntime

Source
pub trait TraceRuntime: Runtime {
    type Receiver: Stream<Item = BatchMessage> + Send;
    type Sender: TrySend + Debug;

    // Required method
    fn batch_message_channel(
        &self,
        capacity: usize,
    ) -> (Self::Sender, Self::Receiver);
}
Available on crate feature trace only.
Expand description

Trace runtime is an extension to Runtime. Currently it provides a channel that used by BatchSpanProcessor.

Required Associated Types§

Source

type Receiver: Stream<Item = BatchMessage> + Send

A future stream to receive the batch messages from channels.

Source

type Sender: TrySend + Debug

A batch messages sender that could be sent across thread safely.

Required Methods§

Source

fn batch_message_channel( &self, capacity: usize, ) -> (Self::Sender, Self::Receiver)

Return the sender and receiver used to send batch message between tasks.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl TraceRuntime for AsyncStd

Available on crate feature rt-async-std only.
Source§

impl TraceRuntime for Tokio

Available on crate feature rt-tokio only.
Source§

impl TraceRuntime for TokioCurrentThread

Available on crate feature rt-tokio-current-thread only.