Struct BatchLogRecordProcessorOptions
Defined in File batch_log_record_processor_options.h
Struct Documentation
-
struct BatchLogRecordProcessorOptions
Struct to hold batch LogRecordProcessor options.
This is an aggregate type that supports C++20 designated initializers. Default values are read from environment variables when an instance is created:
OTEL_BLRP_MAX_QUEUE_SIZE (default: 2048)
OTEL_BLRP_SCHEDULE_DELAY (default: 1000ms)
OTEL_BLRP_EXPORT_TIMEOUT (default: 30000ms)
OTEL_BLRP_MAX_EXPORT_BATCH_SIZE (default: 512)
Usage notes:
If you use default initialization (e.g.,
BatchLogRecordProcessorOptions opts{}), all fields are set by reading the environment variables (or hardcoded defaults if unset).If you use aggregate initialization with explicit values (positional or designated), those values override the environment variable defaults for the specified fields.
With C++20 designated initializers, you can override only specific fields; unspecified fields will use environment variables or hardcoded defaults.
Public Members
-
size_t max_queue_size = batch_log_record_processor_options_env::GetMaxQueueSizeFromEnv()
The maximum buffer/queue size. After the size is reached, log records are dropped.
-
std::chrono::milliseconds schedule_delay_millis = batch_log_record_processor_options_env::GetScheduleDelayFromEnv()
-
std::chrono::milliseconds export_timeout_millis = batch_log_record_processor_options_env::GetExportTimeoutFromEnv()
The maximum time allowed to export data. It is not currently used by the SDK and the parameter is ignored. TODO: Implement the parameter in BatchLogRecordProcessor
-
size_t max_export_batch_size = batch_log_record_processor_options_env::GetMaxExportBatchSizeFromEnv()
The maximum batch size of every export. It must be smaller or equal to max_queue_size.