public static final class BatchSpanProcessor.Builder extends io.opentelemetry.sdk.common.export.ConfigBuilder<BatchSpanProcessor.Builder>
BatchSpanProcessor.| 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,
io.opentelemetry.sdk.common.export.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.
|
protected BatchSpanProcessor.Builder fromConfigMap(Map<String,String> configMap, io.opentelemetry.sdk.common.export.ConfigBuilder.NamingConvention namingConvention)
fromConfigMap in class io.opentelemetry.sdk.common.export.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_SAMPLEDpublic BatchSpanProcessor.Builder setScheduleDelayMillis(long scheduleDelayMillis)
maxQueuedSpans / 2.
Default value is 5000ms.
scheduleDelayMillis - the delay interval between two consecutive exports.DEFAULT_SCHEDULE_DELAY_MILLISpublic BatchSpanProcessor.Builder setExporterTimeoutMillis(int exporterTimeoutMillis)
Default value is 30000ms
exporterTimeoutMillis - the timeout for exports in milliseconds.DEFAULT_EXPORT_TIMEOUT_MILLISpublic 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_SIZEpublic BatchSpanProcessor.Builder setMaxExportBatchSize(int maxExportBatchSize)
maxQueuedSpans.
Default value is 512.
maxExportBatchSize - the maximum batch size for every export.DEFAULT_MAX_EXPORT_BATCH_SIZEpublic BatchSpanProcessor build()
BatchSpanProcessor that batches, then converts spans to proto and
forwards them to the given spanExporter.BatchSpanProcessor.NullPointerException - if the spanExporter is null.