Class HttpReporter.Builder
- java.lang.Object
-
- io.servicetalk.opentracing.zipkin.publisher.reporter.HttpReporter.Builder
-
- Enclosing class:
- HttpReporter
public static final class HttpReporter.Builder extends java.lang.ObjectA builder to create a newHttpReporter.
-
-
Constructor Summary
Constructors Constructor Description Builder(SingleAddressHttpClientBuilder<?,?> clientBuilder)Create a newHttpReporter.Builderusing the passedSingleAddressHttpClientBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpReporter.BuilderbatchSpans(int batchSizeHint, java.time.Duration maxBatchDuration)Configure batching of spans before sending it to the zipkin collector.HttpReporterbuild()Builds a newHttpReporterinstance with this builder's options.HttpReporter.Buildercodec(Codec codec)Sets theCodecto encode the Spans with.HttpReporter.BuilderdisableSpanBatching()Disable batching of spans before sending them to the zipkin collector.HttpReporter.BuildermaxConcurrentReports(int maxConcurrentReports)Sets the maximum number of concurrent requests that will be made to the zipkin collector at any time.
-
-
-
Constructor Detail
-
Builder
public Builder(SingleAddressHttpClientBuilder<?,?> clientBuilder)
Create a newHttpReporter.Builderusing the passedSingleAddressHttpClientBuilder.- Parameters:
clientBuilder- the collector SocketAddress
-
-
Method Detail
-
codec
public HttpReporter.Builder codec(Codec codec)
Sets theCodecto 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-Durationof time to wait forbatchSizeHintspans in a batch.- Returns:
this.
-
disableSpanBatching
public HttpReporter.Builder disableSpanBatching()
Disable batching of spans before sending them to the zipkin collector.- Returns:
this.
-
build
public HttpReporter build()
Builds a newHttpReporterinstance with this builder's options.- Returns:
- a new
HttpReporter
-
-