Struct opentelemetry::runtime::Tokio
source · pub struct Tokio;
Available on crate feature
rt-tokio
only.Expand description
Runtime implementation, which works with Tokio’s multi thread runtime.
Trait Implementations§
source§impl Runtime for Tokio
impl Runtime for Tokio
§type Interval = IntervalStream
type Interval = IntervalStream
A future stream, which returns items in a previously specified interval. The item type is
not important.
§type Delay = Pin<Box<Sleep, Global>>
type Delay = Pin<Box<Sleep, Global>>
A future, which resolves after a previously specified amount of time. The output type is
not important.
source§fn interval(&self, duration: Duration) -> <Tokio as Runtime>::Interval
fn interval(&self, duration: Duration) -> <Tokio as Runtime>::Interval
Create a [Stream][futures_util::stream::Stream], which returns a new item every
Duration.
source§impl TraceRuntime for Tokio
impl TraceRuntime for Tokio
§type Receiver = ReceiverStream<BatchMessage>
type Receiver = ReceiverStream<BatchMessage>
A future stream to receive the batch messages from channels.
§type Sender = Sender<BatchMessage>
type Sender = Sender<BatchMessage>
A batch messages sender that could be sent across thread safely.
source§fn batch_message_channel(
&self,
capacity: usize
) -> (<Tokio as TraceRuntime>::Sender, <Tokio as TraceRuntime>::Receiver)
fn batch_message_channel( &self, capacity: usize ) -> (<Tokio as TraceRuntime>::Sender, <Tokio as TraceRuntime>::Receiver)
Return the sender and receiver used to send batch message between tasks.