Trait opentelemetry_sdk::runtime::RuntimeChannel

source ·
pub trait RuntimeChannel: Runtime {
    type Receiver<T: Debug + Send>: Stream<Item = T> + Send;
    type Sender<T: Debug + Send>: TrySend<Message = T> + Debug;

    // Required method
    fn batch_message_channel<T: Debug + Send>(
        &self,
        capacity: usize
    ) -> (Self::Sender<T>, Self::Receiver<T>);
}
Expand description

RuntimeChannel is an extension to Runtime. Currently, it provides a channel that is used by the log and span batch processors.

Required Associated Types§

source

type Receiver<T: Debug + Send>: Stream<Item = T> + Send

A future stream to receive batch messages from channels.

source

type Sender<T: Debug + Send>: TrySend<Message = T> + Debug

A batch messages sender that can be sent across threads safely.

Required Methods§

source

fn batch_message_channel<T: Debug + Send>( &self, capacity: usize ) -> (Self::Sender<T>, Self::Receiver<T>)

Return the sender and receiver used to send batch messages.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl RuntimeChannel for AsyncStd

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

type Receiver<T: Debug + Send> = Receiver<T>

§

type Sender<T: Debug + Send> = Sender<T>

source§

impl RuntimeChannel for Tokio

Available on crate feature rt-tokio only.
§

type Receiver<T: Debug + Send> = ReceiverStream<T>

§

type Sender<T: Debug + Send> = Sender<T>

source§

impl RuntimeChannel for TokioCurrentThread

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

type Receiver<T: Debug + Send> = ReceiverStream<T>

§

type Sender<T: Debug + Send> = Sender<T>