Class HttpReporter.Builder

java.lang.Object
io.servicetalk.opentracing.zipkin.publisher.reporter.HttpReporter.Builder
Enclosing class:
HttpReporter

public static final class HttpReporter.Builder extends Object
A builder to create a new HttpReporter.
  • Constructor Details

  • Method Details

    • 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, 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.
    • spansBatchingEnabled

      public HttpReporter.Builder spansBatchingEnabled(boolean enable)
      Configure batching of spans before sending them to the zipkin collector.
      Parameters:
      enable - When false batching will be disabled.
      Returns:
      this.
    • build

      public HttpReporter build()
      Builds a new HttpReporter instance with this builder's options.
      Returns:
      a new HttpReporter