public static final class BatchSpansProcessor.Builder extends Object
BatchSpansProcessor.| Modifier and Type | Method and Description |
|---|---|
BatchSpansProcessor |
build()
Returns a new
BatchSpansProcessor that batches, then converts spans to proto and
forwards them to the given spanExporter. |
BatchSpansProcessor.Builder |
reportOnlySampled(boolean sampled)
Set whether only sampled spans should be reported.
|
BatchSpansProcessor.Builder |
setExporterTimeoutMillis(int exporterTimeoutMillis)
Sets the maximum time an exporter will be allowed to run before being cancelled.
|
BatchSpansProcessor.Builder |
setMaxExportBatchSize(int maxExportBatchSize)
Sets the maximum batch size for every export.
|
BatchSpansProcessor.Builder |
setMaxQueueSize(int maxQueueSize)
Sets the maximum number of Spans that are kept in the queue before start dropping.
|
BatchSpansProcessor.Builder |
setScheduleDelayMillis(long scheduleDelayMillis)
Sets the delay interval between two consecutive exports.
|
public BatchSpansProcessor.Builder reportOnlySampled(boolean sampled)
sampled - report only sampled spans.public BatchSpansProcessor.Builder setScheduleDelayMillis(long scheduleDelayMillis)
maxQueuedSpans / 2.
Default value is 5000ms.
scheduleDelayMillis - the delay interval between two consecutive exports.public BatchSpansProcessor.Builder setExporterTimeoutMillis(int exporterTimeoutMillis)
Default value is 30000ms
exporterTimeoutMillis - the timeout for exports in milliseconds.public BatchSpansProcessor.Builder setMaxQueueSize(int maxQueueSize)
See the BatchSampledSpansProcessor class description for a high-level design description of this class.
Default value is 2048.
maxQueueSize - the maximum number of Spans that are kept in the queue before start
dropping.public BatchSpansProcessor.Builder setMaxExportBatchSize(int maxExportBatchSize)
maxQueuedSpans.
Default value is 512.
maxExportBatchSize - the maximum batch size for every export.public BatchSpansProcessor build()
BatchSpansProcessor that batches, then converts spans to proto and
forwards them to the given spanExporter.BatchSpansProcessor.NullPointerException - if the spanExporter is null.