Class HttpReporter.Builder
java.lang.Object
io.servicetalk.opentracing.zipkin.publisher.reporter.HttpReporter.Builder
- Enclosing class:
- HttpReporter
A builder to create a new
HttpReporter
.-
Constructor Summary
ConstructorsConstructorDescriptionBuilder
(SingleAddressHttpClientBuilder<?, ?> clientBuilder) Create a newHttpReporter.Builder
using the passedSingleAddressHttpClientBuilder
. -
Method Summary
Modifier and TypeMethodDescriptionbatchSpans
(int batchSizeHint, Duration maxBatchDuration) Configure batching of spans before sending it to the zipkin collector.build()
Builds a newHttpReporter
instance with this builder's options.Sets theCodec
to encode the Spans with.maxConcurrentReports
(int maxConcurrentReports) Sets the maximum number of concurrent requests that will be made to the zipkin collector at any time.spansBatchingEnabled
(boolean enable) Configure batching of spans before sending them to the zipkin collector.
-
Constructor Details
-
Builder
Create a newHttpReporter.Builder
using the passedSingleAddressHttpClientBuilder
.- Parameters:
clientBuilder
- the collector SocketAddress
-
-
Method Details
-
codec
Sets theCodec
to encode the Spans with.- Parameters:
codec
- the codec to use for this span.- Returns:
this
-
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
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
.
-
spansBatchingEnabled
Configure batching of spans before sending them to the zipkin collector.- Parameters:
enable
- Whenfalse
batching will be disabled.- Returns:
this
.
-
build
Builds a newHttpReporter
instance with this builder's options.- Returns:
- a new
HttpReporter
-