Package io.opentelemetry.exporter.zipkin
Class ZipkinSpanExporterBuilder
java.lang.Object
io.opentelemetry.exporter.zipkin.ZipkinSpanExporterBuilder
Builder class for
ZipkinSpanExporter.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aZipkinSpanExporter.setCompression(String compressionMethod) Sets the method used to compress payloads.setEncoder(zipkin2.codec.BytesEncoder<zipkin2.Span> encoder) Deprecated.setEncoder(zipkin2.reporter.BytesEncoder<zipkin2.Span> encoder) Sets theBytesEncoder, which controls the format used by theBytesMessageSender.setEndpoint(String endpoint) Sets the zipkin endpoint.setInternalTelemetryVersion(io.opentelemetry.sdk.common.InternalTelemetryVersion level) Sets theInternalTelemetryVersiondefining which self-monitoring metrics this exporter collects.setLocalIpAddressSupplier(Supplier<InetAddress> localIpAddressSupplier) Sets the Supplier of InetAddress.setMeterProvider(io.opentelemetry.api.metrics.MeterProvider meterProvider) Sets theMeterProviderto use to collect metrics related to export.setReadTimeout(long timeout, TimeUnit unit) Sets the maximum time to wait for the export of a batch of spans.setReadTimeout(Duration timeout) Sets the maximum time to wait for the export of a batch of spans.setSender(zipkin2.reporter.BytesMessageSender sender) Sets the Zipkin sender.setSender(zipkin2.reporter.Sender sender) Deprecated.UsesetSender(BytesMessageSender)insteead.
-
Constructor Details
-
ZipkinSpanExporterBuilder
public ZipkinSpanExporterBuilder()
-
-
Method Details
-
setSender
Deprecated.UsesetSender(BytesMessageSender)insteead.Sets the Zipkin sender. Implements the client side of the span transport. AnOkHttpSenderis a good default.The
Closeable.close()method will be called when the exporter is shut down.- Parameters:
sender- the Zipkin sender implementation.- Returns:
- this.
-
setSender
Sets the Zipkin sender. Implements the client side of the span transport. AnOkHttpSenderis a good default.The
Closeable.close()method will be called when the exporter is shut down.- Parameters:
sender- the Zipkin sender implementation.- Returns:
- this.
- Since:
- 1.35.0
-
setEncoder
@Deprecated public ZipkinSpanExporterBuilder setEncoder(zipkin2.codec.BytesEncoder<zipkin2.Span> encoder) Deprecated.UsesetEncoder(BytesEncoder)instead.Sets theBytesEncoder, which controls the format used by theBytesMessageSender. Defaults to theSpanBytesEncoder.JSON_V2.- Parameters:
encoder- theBytesEncoderto use.- Returns:
- this.
- See Also:
-
SpanBytesEncoder
-
setEncoder
Sets theBytesEncoder, which controls the format used by theBytesMessageSender. Defaults to theSpanBytesEncoder.JSON_V2.- Parameters:
encoder- theBytesEncoderto use.- Returns:
- this.
- Since:
- 1.35.0
- See Also:
-
SpanBytesEncoder
-
setLocalIpAddressSupplier
public ZipkinSpanExporterBuilder setLocalIpAddressSupplier(Supplier<InetAddress> localIpAddressSupplier) Sets the Supplier of InetAddress. This Supplier will be used by theOtelToZipkinSpanTransformerwhen creating the Zipkin local endpoint. The default implementation uses a Supplier that returns a single unchanging IP address that is captured at creation time.- Parameters:
localIpAddressSupplier- - A supplier that returns an InetAddress that may be null.- Returns:
- this
- Since:
- 1.18.0
-
setEndpoint
Sets the zipkin endpoint. This will use the endpoint to assign anOkHttpSenderinstance to this builder.- Parameters:
endpoint- The Zipkin endpoint URL, ex. "http://zipkinhost:9411/api/v2/spans".- Returns:
- this.
- See Also:
-
OkHttpSender
-
setCompression
Sets the method used to compress payloads. If unset, gzip compression is enabled. Currently supported compression methods include "gzip" and "none".The compression method is ignored when a custom Zipkin sender is set via
setSender(BytesMessageSender).- Parameters:
compressionMethod- The compression method, ex. "gzip".- Returns:
- this.
- Since:
- 1.20.0
- See Also:
-
OkHttpSender
-
setReadTimeout
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
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
-
setMeterProvider
public ZipkinSpanExporterBuilder setMeterProvider(io.opentelemetry.api.metrics.MeterProvider meterProvider) Sets theMeterProviderto use to collect metrics related to export. If not set, usesGlobalOpenTelemetry.getMeterProvider().- Returns:
- this.
- Since:
- 1.17.0
-
setInternalTelemetryVersion
public ZipkinSpanExporterBuilder setInternalTelemetryVersion(io.opentelemetry.sdk.common.InternalTelemetryVersion level) Sets theInternalTelemetryVersiondefining which self-monitoring metrics this exporter collects.- Since:
- 1.51.0
-
build
Builds aZipkinSpanExporter.- Returns:
- a
ZipkinSpanExporter.
-
setEncoder(BytesEncoder)instead.