Class HttpReporter.Builder

  • Enclosing class:
    HttpReporter

    public static final class HttpReporter.Builder
    extends java.lang.Object
    A builder to create a new HttpReporter.
    • Method Detail

      • codec

        public HttpReporter.Builder codec​(Codec codec)
        Sets the Codec to encode the Spans with.
        Parameters:
        codec - the codec to use for this span.
        Returns:
        this
      • maxConcurrentReports

        public HttpReporter.Builder maxConcurrentReports​(int maxConcurrentReports)
        Sets the maximum number of concurrent requests that will be made to the zipkin collector at any time.
        Parameters:
        maxConcurrentReports - maximum number of concurrent requests that will be made to the zipkin collector at any time.
        Returns:
        this.
      • batchSpans

        public HttpReporter.Builder batchSpans​(int batchSizeHint,
                                               java.time.Duration maxBatchDuration)
        Configure batching of spans before sending it to the zipkin collector.
        Parameters:
        batchSizeHint - Hint of how many spans should be batched together.
        maxBatchDuration - Duration of time to wait for batchSizeHint spans in a batch.
        Returns:
        this.
      • disableSpanBatching

        public HttpReporter.Builder disableSpanBatching()
        Disable batching of spans before sending them to the zipkin collector.
        Returns:
        this.