Struct BatchConfigBuilder
pub struct BatchConfigBuilder { /* private fields */ }Expand description
A builder for creating BatchConfig instances.
Implementations§
§impl BatchConfigBuilder
impl BatchConfigBuilder
pub fn with_max_queue_size(self, max_queue_size: usize) -> BatchConfigBuilder
pub fn with_max_queue_size(self, max_queue_size: usize) -> BatchConfigBuilder
Set max_queue_size for BatchConfigBuilder.
It’s the maximum queue size to buffer logs for delayed processing.
If the queue gets full it will drop the logs.
The default value is 2048.
Corresponding environment variable: OTEL_BLRP_MAX_QUEUE_SIZE.
Note: Programmatically setting this will override any value set via the environment variable.
pub fn with_scheduled_delay(
self,
scheduled_delay: Duration,
) -> BatchConfigBuilder
pub fn with_scheduled_delay( self, scheduled_delay: Duration, ) -> BatchConfigBuilder
Set scheduled_delay for BatchConfigBuilder.
It’s the delay interval in milliseconds between two consecutive processing of batches.
The default value is 1000 milliseconds.
Corresponding environment variable: OTEL_BLRP_SCHEDULE_DELAY.
Note: Programmatically setting this will override any value set via the environment variable.
pub fn with_max_export_batch_size(
self,
max_export_batch_size: usize,
) -> BatchConfigBuilder
pub fn with_max_export_batch_size( self, max_export_batch_size: usize, ) -> BatchConfigBuilder
Set max_export_batch_size for BatchConfigBuilder.
It’s the maximum number of logs to process in a single batch. If there are
more than one batch worth of logs then it processes multiple batches
of logs one batch after the other without any delay.
The default value is 512.
Corresponding environment variable: OTEL_BLRP_MAX_EXPORT_BATCH_SIZE.
Note: Programmatically setting this will override any value set via the environment variable.
pub fn build(self) -> BatchConfig
pub fn build(self) -> BatchConfig
Builds a BatchConfig enforcing the following invariants:
max_export_batch_sizemust be less than or equal tomax_queue_size.
Trait Implementations§
§impl Debug for BatchConfigBuilder
impl Debug for BatchConfigBuilder
§impl Default for BatchConfigBuilder
impl Default for BatchConfigBuilder
§fn default() -> BatchConfigBuilder
fn default() -> BatchConfigBuilder
Create a new BatchConfigBuilder initialized with default batch config values as per the specs.
The values are overridden by environment variables if set.
The supported environment variables are:
OTEL_BLRP_MAX_QUEUE_SIZEOTEL_BLRP_SCHEDULE_DELAYOTEL_BLRP_MAX_EXPORT_BATCH_SIZEOTEL_BLRP_EXPORT_TIMEOUT
Note: Programmatic configuration overrides any value set via the environment variable.
Auto Trait Implementations§
impl Freeze for BatchConfigBuilder
impl RefUnwindSafe for BatchConfigBuilder
impl Send for BatchConfigBuilder
impl Sync for BatchConfigBuilder
impl Unpin for BatchConfigBuilder
impl UnwindSafe for BatchConfigBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more