Package io.opentelemetry.sdk.logs.export
Class BatchLogProcessorBuilder
java.lang.Object
io.opentelemetry.sdk.logs.export.BatchLogProcessorBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a BatchLogProcessor.longintintlongsetExporterTimeoutMillis(int exporterTimeoutMillis) Sets the maximum time an exporter will be allowed to run before being cancelled.setMaxExportBatchSize(int maxExportBatchSize) Sets the maximum batch size for every export.setMaxQueueSize(int maxQueueSize) Sets the maximum number of Spans that are kept in the queue before start dropping.setScheduleDelayMillis(long scheduleDelayMillis) Sets the delay interval between two consecutive exports.
-
Method Details
-
build
Build a BatchLogProcessor.- Returns:
- configured processor
-
setScheduleDelayMillis
Sets the delay interval between two consecutive exports. The actual interval may be shorter if the batch size is getting larger thanmaxQueuedSpans / 2.Default value is
250ms.- Parameters:
scheduleDelayMillis- the delay interval between two consecutive exports.- Returns:
- this.
- See Also:
-
DEFAULT_SCHEDULE_DELAY_MILLIS
-
getScheduleDelayMillis
public long getScheduleDelayMillis() -
setExporterTimeoutMillis
Sets the maximum time an exporter will be allowed to run before being cancelled.Default value is
30000ms- Parameters:
exporterTimeoutMillis- the timeout for exports in milliseconds.- Returns:
- this
- See Also:
-
DEFAULT_EXPORT_TIMEOUT_MILLIS
-
getExporterTimeoutMillis
public long getExporterTimeoutMillis() -
setMaxQueueSize
Sets the maximum number of Spans that are kept in the queue before start dropping.See the BatchSampledSpansProcessor class description for a high-level design description of this class.
Default value is
2048.- Parameters:
maxQueueSize- the maximum number of Spans that are kept in the queue before start dropping.- Returns:
- this.
- See Also:
-
DEFAULT_MAX_QUEUE_SIZE
-
getMaxQueueSize
public int getMaxQueueSize() -
setMaxExportBatchSize
Sets the maximum batch size for every export. This must be smaller or equal tomaxQueuedSpans.Default value is
512.- Parameters:
maxExportBatchSize- the maximum batch size for every export.- Returns:
- this.
- See Also:
-
DEFAULT_MAX_EXPORT_BATCH_SIZE
-
getMaxExportBatchSize
public int getMaxExportBatchSize()
-