Skip to main content

TraceExporter

Trait TraceExporter 

Source
pub trait TraceExporter: Send + Sync {
    // Required method
    fn export<'life0, 'life1, 'async_trait>(
        &'life0 self,
        trace: &'life1 Trace,
    ) -> Pin<Box<dyn Future<Output = Result<(), ExporterError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn export_batch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        traces: &'life1 [Trace],
    ) -> Pin<Box<dyn Future<Output = Vec<Result<(), ExporterError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Trait implemented by all observability backends.

Required Methods§

Source

fn export<'life0, 'life1, 'async_trait>( &'life0 self, trace: &'life1 Trace, ) -> Pin<Box<dyn Future<Output = Result<(), ExporterError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Export a single trace to the backend.

Provided Methods§

Source

fn export_batch<'life0, 'life1, 'async_trait>( &'life0 self, traces: &'life1 [Trace], ) -> Pin<Box<dyn Future<Output = Vec<Result<(), ExporterError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Export a batch of traces (default: loop over export).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§