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,
record: &mut SdkLogRecord,
instrumentation: &InstrumentationScope,
)
fn emit( &self, record: &mut SdkLogRecord, instrumentation: &InstrumentationScope, )
Called when a log record is ready to processed and exported. Read more
Source§fn force_flush(&self) -> OTelSdkResult
fn force_flush(&self) -> OTelSdkResult
Force the logs lying in the cache to be exported.
Source§fn shutdown(&self) -> OTelSdkResult
fn shutdown(&self) -> OTelSdkResult
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