Class BatchLogProcessorBuilder


  • public final class BatchLogProcessorBuilder
    extends Object
    • 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 than maxQueuedSpans / 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

        public BatchLogProcessorBuilder setExporterTimeoutMillis​(int exporterTimeoutMillis)
        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

        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 to maxQueuedSpans.

        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()