Package io.opentelemetry.exporter.zipkin
Class ZipkinSpanExporterBuilder
- java.lang.Object
-
- io.opentelemetry.exporter.zipkin.ZipkinSpanExporterBuilder
-
public final class ZipkinSpanExporterBuilder extends Object
Builder class forZipkinSpanExporter.
-
-
Constructor Summary
Constructors Constructor Description ZipkinSpanExporterBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZipkinSpanExporterbuild()Builds aZipkinSpanExporter.ZipkinSpanExporterBuildersetEncoder(zipkin2.codec.BytesEncoder<zipkin2.Span> encoder)Sets theBytesEncoder, which controls the format used by theSender.ZipkinSpanExporterBuildersetEndpoint(String endpoint)Sets the zipkin endpoint.ZipkinSpanExporterBuildersetReadTimeout(long timeout, TimeUnit unit)Sets the maximum time to wait for the export of a batch of spans.ZipkinSpanExporterBuildersetReadTimeout(Duration timeout)Sets the maximum time to wait for the export of a batch of spans.ZipkinSpanExporterBuildersetSender(zipkin2.reporter.Sender sender)Sets the Zipkin sender.
-
-
-
Method Detail
-
setSender
public ZipkinSpanExporterBuilder setSender(zipkin2.reporter.Sender sender)
Sets the Zipkin sender. Implements the client side of the span transport. AOkHttpSenderis a good default.The
Component.close()method will be called when the exporter is shut down.- Parameters:
sender- the Zipkin sender implementation.- Returns:
- this.
-
setEncoder
public ZipkinSpanExporterBuilder setEncoder(zipkin2.codec.BytesEncoder<zipkin2.Span> encoder)
Sets theBytesEncoder, which controls the format used by theSender. Defaults to theSpanBytesEncoder.JSON_V2.- Parameters:
encoder- theBytesEncoderto use.- Returns:
- this.
- See Also:
SpanBytesEncoder
-
setEndpoint
public ZipkinSpanExporterBuilder setEndpoint(String endpoint)
Sets the zipkin endpoint. This will use the endpoint to assign aOkHttpSenderinstance to this builder.- Parameters:
endpoint- The Zipkin endpoint URL, ex. "http://zipkinhost:9411/api/v2/spans".- Returns:
- this.
- See Also:
OkHttpSender
-
setReadTimeout
public ZipkinSpanExporterBuilder setReadTimeout(long timeout, TimeUnit unit)
Sets the maximum time to wait for the export of a batch of spans. If unset, defaults to 10s.- Returns:
- this.
- Since:
- 1.2.0
-
setReadTimeout
public ZipkinSpanExporterBuilder setReadTimeout(Duration timeout)
Sets the maximum time to wait for the export of a batch of spans. If unset, defaults to 10s.- Returns:
- this.
- Since:
- 1.2.0
-
build
public ZipkinSpanExporter build()
Builds aZipkinSpanExporter.- Returns:
- a
ZipkinSpanExporter.
-
-