Class BatchLogProcessorBuilder
- java.lang.Object
-
- io.opentelemetry.sdk.logging.export.BatchLogProcessorBuilder
-
public final class BatchLogProcessorBuilder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchLogProcessor
build()
Build a BatchLogProcessor.long
getExporterTimeoutMillis()
int
getMaxExportBatchSize()
int
getMaxQueueSize()
long
getScheduleDelayMillis()
BatchLogProcessorBuilder
setExporterTimeoutMillis(int exporterTimeoutMillis)
Sets the maximum time an exporter will be allowed to run before being cancelled.BatchLogProcessorBuilder
setMaxExportBatchSize(int maxExportBatchSize)
Sets the maximum batch size for every export.BatchLogProcessorBuilder
setMaxQueueSize(int maxQueueSize)
Sets the maximum number of Spans that are kept in the queue before start dropping.BatchLogProcessorBuilder
setScheduleDelayMillis(long scheduleDelayMillis)
Sets the delay interval between two consecutive exports.
-
-
-
Method Detail
-
build
public BatchLogProcessor build()
Build a BatchLogProcessor.- Returns:
- configured processor
-
setScheduleDelayMillis
public BatchLogProcessorBuilder setScheduleDelayMillis(long scheduleDelayMillis)
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
250
ms.- Parameters:
scheduleDelayMillis
- the delay interval between two consecutive exports.- Returns:
- this.
- See Also:
DEFAULT_SCHEDULE_DELAY_MILLIS
-
getScheduleDelayMillis
public long getScheduleDelayMillis()
-
setExporterTimeoutMillis
public BatchLogProcessorBuilder setExporterTimeoutMillis(int exporterTimeoutMillis)
Sets the maximum time an exporter will be allowed to run before being cancelled.Default value is
30000
ms- Parameters:
exporterTimeoutMillis
- the timeout for exports in milliseconds.- Returns:
- this
- See Also:
DEFAULT_EXPORT_TIMEOUT_MILLIS
-
getExporterTimeoutMillis
public long getExporterTimeoutMillis()
-
setMaxQueueSize
public BatchLogProcessorBuilder setMaxQueueSize(int maxQueueSize)
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
public BatchLogProcessorBuilder setMaxExportBatchSize(int maxExportBatchSize)
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()
-
-