Trait opentelemetry_sdk::export::logs::LogExporter

source ·
pub trait LogExporter:
    Send
    + Sync
    + Debug {
    // Required method
    fn export<'a, 'life0, 'async_trait>(
        &'life0 mut self,
        batch: Vec<Cow<'a, LogData>>,
    ) -> Pin<Box<dyn Future<Output = LogResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn shutdown(&mut self) { ... }
    fn set_resource(&mut self, _resource: &Resource) { ... }
}
Expand description

LogExporter defines the interface that log exporters should implement.

Required Methods§

source

fn export<'a, 'life0, 'async_trait>( &'life0 mut self, batch: Vec<Cow<'a, LogData>>, ) -> Pin<Box<dyn Future<Output = LogResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Exports a batch of LogData.

Provided Methods§

source

fn shutdown(&mut self)

Shuts down the exporter.

source

fn set_resource(&mut self, _resource: &Resource)

Set the resource for the exporter.

Implementors§