Struct opentelemetry::sdk::trace::BatchConfig
source · [−]pub struct BatchConfig { /* private fields */ }
trace
only.Expand description
Batch span processor configuration
Implementations
sourceimpl BatchConfig
impl BatchConfig
sourcepub fn with_max_queue_size(self, max_queue_size: usize) -> BatchConfig
pub fn with_max_queue_size(self, max_queue_size: usize) -> BatchConfig
Set max_queue_size for BatchConfig
.
It’s the maximum queue size to buffer spans for delayed processing.
If the queue gets full it will drops the spans.
The default value of is 2048.
sourcepub fn with_max_export_batch_size(
self,
max_export_batch_size: usize
) -> BatchConfig
pub fn with_max_export_batch_size(
self,
max_export_batch_size: usize
) -> BatchConfig
Set max_export_batch_size for BatchConfig
.
It’s the maximum number of spans to process in a single batch. If there are
more than one batch worth of spans then it processes multiple batches
of spans one batch after the other without any delay. The default value
is 512.
sourcepub fn with_max_concurrent_exports(
self,
max_concurrent_exports: usize
) -> BatchConfig
pub fn with_max_concurrent_exports(
self,
max_concurrent_exports: usize
) -> BatchConfig
Set max_concurrent_exports for BatchConfig
.
It’s the maximum number of concurrent exports.
Limits the number of spawned tasks for exports and thus memory consumed by an exporter.
The default value is 1.
IF the max_concurrent_exports value is default value, it will cause exports to be performed
synchronously on the BatchSpanProcessor task.
sourcepub fn with_scheduled_delay(self, scheduled_delay: Duration) -> BatchConfig
pub fn with_scheduled_delay(self, scheduled_delay: Duration) -> BatchConfig
Set scheduled_delay_duration for BatchConfig
.
It’s the delay interval in milliseconds between two consecutive processing of batches.
The default value is 5000 milliseconds.
sourcepub fn with_max_export_timeout(self, max_export_timeout: Duration) -> BatchConfig
pub fn with_max_export_timeout(self, max_export_timeout: Duration) -> BatchConfig
Set max_export_timeout for BatchConfig
.
It’s the maximum duration to export a batch of data.
The The default value is 30000 milliseconds.
Trait Implementations
sourceimpl Debug for BatchConfig
impl Debug for BatchConfig
sourceimpl Default for BatchConfig
impl Default for BatchConfig
sourcefn default() -> BatchConfig
fn default() -> BatchConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for BatchConfig
impl Send for BatchConfig
impl Sync for BatchConfig
impl Unpin for BatchConfig
impl UnwindSafe for BatchConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more