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.Object
A builder to create a newHttpReporter
.
-
-
Constructor Summary
Constructors Constructor Description Builder(SingleAddressHttpClientBuilder<?,?> clientBuilder)
Create a newHttpReporter.Builder
using the passedSingleAddressHttpClientBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpReporter.Builder
batchSpans(int batchSizeHint, java.time.Duration maxBatchDuration)
Configure batching of spans before sending it to the zipkin collector.HttpReporter
build()
Builds a newHttpReporter
instance with this builder's options.HttpReporter.Builder
codec(Codec codec)
Sets theCodec
to encode the Spans with.HttpReporter.Builder
disableSpanBatching()
Disable batching of spans before sending them to the zipkin collector.HttpReporter.Builder
maxConcurrentReports(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.Builder
using the passedSingleAddressHttpClientBuilder
.- Parameters:
clientBuilder
- the collector SocketAddress
-
-
Method Detail
-
codec
public HttpReporter.Builder codec(Codec codec)
Sets theCodec
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 forbatchSizeHint
spans 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 newHttpReporter
instance with this builder's options.- Returns:
- a new
HttpReporter
-
-