pub struct ProcessorConfig {
pub max_queue_size: usize,
}Expand description
Configuration for the Lambda span processor.
This struct allows customizing the behavior of the span processor to match your workload’s requirements. The configuration affects memory usage, span handling capacity, and potential span loss under high load.
§Configuration Options
max_queue_size: Maximum number of spans that can be stored in memory- Determines memory usage (each span ≈ 100-500 bytes)
- When full, new spans are dropped with warning logs
- Should be sized based on expected span volume
§Environment Variables
The queue size can be configured using the LAMBDA_SPAN_PROCESSOR_QUEUE_SIZE
environment variable. If not set, defaults to 2048 spans.
§Example
use lambda_otel_lite::ProcessorConfig;
// Default configuration (2048 spans)
let config = ProcessorConfig::default();
// Custom configuration for high volume
let config = ProcessorConfig {
max_queue_size: 4096,
};Fields§
§max_queue_size: usizeMaximum number of spans that can be stored in memory
Trait Implementations§
Source§impl Debug for ProcessorConfig
impl Debug for ProcessorConfig
Auto Trait Implementations§
impl Freeze for ProcessorConfig
impl RefUnwindSafe for ProcessorConfig
impl Send for ProcessorConfig
impl Sync for ProcessorConfig
impl Unpin for ProcessorConfig
impl UnwindSafe for ProcessorConfig
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request