Struct opentelemetry_sdk::logs::BatchLogProcessor
source · pub struct BatchLogProcessor<R: RuntimeChannel> { /* private fields */ }
Expand description
A LogProcessor
that asynchronously buffers log records and reports
them at a pre-configured interval.
Implementations§
source§impl<R: RuntimeChannel> BatchLogProcessor<R>
impl<R: RuntimeChannel> BatchLogProcessor<R>
sourcepub fn builder<E>(exporter: E, runtime: R) -> BatchLogProcessorBuilder<E, R>where
E: LogExporter,
pub fn builder<E>(exporter: E, runtime: R) -> BatchLogProcessorBuilder<E, R>where
E: LogExporter,
Create a new batch processor builder
Trait Implementations§
source§impl<R: RuntimeChannel> Debug for BatchLogProcessor<R>
impl<R: RuntimeChannel> Debug for BatchLogProcessor<R>
source§impl<R: RuntimeChannel> LogProcessor for BatchLogProcessor<R>
impl<R: RuntimeChannel> LogProcessor for BatchLogProcessor<R>
source§fn emit(&self, data: &mut LogData)
fn emit(&self, data: &mut LogData)
Called when a log record is ready to processed and exported. Read more
source§fn force_flush(&self) -> LogResult<()>
fn force_flush(&self) -> LogResult<()>
Force the logs lying in the cache to be exported.
source§fn shutdown(&self) -> LogResult<()>
fn shutdown(&self) -> LogResult<()>
Shuts down the processor.
After shutdown returns the log processor should stop processing any logs.
It’s up to the implementation on when to drop the LogProcessor.
source§fn set_resource(&self, resource: &Resource)
fn set_resource(&self, resource: &Resource)
Set the resource for the log processor.
Auto Trait Implementations§
impl<R> Freeze for BatchLogProcessor<R>
impl<R> RefUnwindSafe for BatchLogProcessor<R>
impl<R> Send for BatchLogProcessor<R>
impl<R> Sync for BatchLogProcessor<R>
impl<R> Unpin for BatchLogProcessor<R>
impl<R> UnwindSafe for BatchLogProcessor<R>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more