pub struct BatchingManager { /* private fields */ }Expand description
Batching manager for telemetry data
Implementations§
Source§impl BatchingManager
impl BatchingManager
pub fn new(config: BatchingConfig) -> Self
Sourcepub fn set_flush_callback<F>(&mut self, callback: F)
pub fn set_flush_callback<F>(&mut self, callback: F)
Set the flush callback function
Sourcepub fn add_span(&self, span: SpanData) -> ObservabilityResult<()>
pub fn add_span(&self, span: SpanData) -> ObservabilityResult<()>
Add a span to the batch
Sourcepub fn add_metric(&self, metric: MetricData) -> ObservabilityResult<()>
pub fn add_metric(&self, metric: MetricData) -> ObservabilityResult<()>
Add a metric to the batch
Sourcepub fn add_log(&self, log: LogData) -> ObservabilityResult<()>
pub fn add_log(&self, log: LogData) -> ObservabilityResult<()>
Add a log to the batch
Sourcepub fn flush_all(&self) -> ObservabilityResult<()>
pub fn flush_all(&self) -> ObservabilityResult<()>
Force flush all buffers
Sourcepub fn get_stats(&self) -> BatchingStats
pub fn get_stats(&self) -> BatchingStats
Get buffer statistics
Auto Trait Implementations§
impl Freeze for BatchingManager
impl RefUnwindSafe for BatchingManager
impl Send for BatchingManager
impl Sync for BatchingManager
impl Unpin for BatchingManager
impl UnsafeUnpin for BatchingManager
impl UnwindSafe for BatchingManager
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