public static final class BatchSpanProcessor.Builder extends ConfigBuilder<BatchSpanProcessor.Builder>
BatchSpanProcessor
.ConfigBuilder.NamingConvention
Modifier and Type | Method and Description |
---|---|
BatchSpanProcessor |
build()
Returns a new
BatchSpanProcessor that batches, then converts spans to proto and
forwards them to the given spanExporter . |
protected BatchSpanProcessor.Builder |
fromConfigMap(Map<String,String> configMap,
ConfigBuilder.NamingConvention namingConvention)
Sets the configuration values from the given configuration map for only the available keys.
|
BatchSpanProcessor.Builder |
setExporterTimeoutMillis(int exporterTimeoutMillis)
Sets the maximum time an exporter will be allowed to run before being cancelled.
|
BatchSpanProcessor.Builder |
setExportOnlySampled(boolean exportOnlySampled)
Set whether only sampled spans should be reported.
|
BatchSpanProcessor.Builder |
setMaxExportBatchSize(int maxExportBatchSize)
Sets the maximum batch size for every export.
|
BatchSpanProcessor.Builder |
setMaxQueueSize(int maxQueueSize)
Sets the maximum number of Spans that are kept in the queue before start dropping.
|
BatchSpanProcessor.Builder |
setScheduleDelayMillis(long scheduleDelayMillis)
Sets the delay interval between two consecutive exports.
|
getBooleanProperty, getDoubleProperty, getIntProperty, getLongProperty, getStringProperty, readEnvironmentVariables, readProperties, readSystemProperties
protected BatchSpanProcessor.Builder fromConfigMap(Map<String,String> configMap, ConfigBuilder.NamingConvention namingConvention)
fromConfigMap
in class ConfigBuilder<BatchSpanProcessor.Builder>
configMap
- Map
holding the configuration values.public BatchSpanProcessor.Builder setExportOnlySampled(boolean exportOnlySampled)
Default value is true
.
exportOnlySampled
- if true
report only sampled spans.DEFAULT_EXPORT_ONLY_SAMPLED
public BatchSpanProcessor.Builder setScheduleDelayMillis(long scheduleDelayMillis)
maxQueuedSpans / 2
.
Default value is 5000
ms.
scheduleDelayMillis
- the delay interval between two consecutive exports.DEFAULT_SCHEDULE_DELAY_MILLIS
public BatchSpanProcessor.Builder setExporterTimeoutMillis(int exporterTimeoutMillis)
Default value is 30000
ms
exporterTimeoutMillis
- the timeout for exports in milliseconds.DEFAULT_EXPORT_TIMEOUT_MILLIS
public BatchSpanProcessor.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.DEFAULT_MAX_QUEUE_SIZE
public BatchSpanProcessor.Builder setMaxExportBatchSize(int maxExportBatchSize)
maxQueuedSpans
.
Default value is 512
.
maxExportBatchSize
- the maximum batch size for every export.DEFAULT_MAX_EXPORT_BATCH_SIZE
public BatchSpanProcessor build()
BatchSpanProcessor
that batches, then converts spans to proto and
forwards them to the given spanExporter
.BatchSpanProcessor
.NullPointerException
- if the spanExporter
is null
.