public static final class ZipkinSpanExporter.Builder extends io.opentelemetry.sdk.common.export.ConfigBuilder<ZipkinSpanExporter.Builder>
ZipkinSpanExporter
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ZipkinSpanExporter |
build()
Builds a
ZipkinSpanExporter . |
protected ZipkinSpanExporter.Builder |
fromConfigMap(java.util.Map<java.lang.String,java.lang.String> configMap,
io.opentelemetry.sdk.common.export.ConfigBuilder.NamingConvention namingConvention)
Sets the configuration values from the given configuration map for only the available keys.
|
ZipkinSpanExporter.Builder |
setEncoder(zipkin2.codec.BytesEncoder<zipkin2.Span> encoder)
Sets the
BytesEncoder , which controls the format used by the Sender . |
ZipkinSpanExporter.Builder |
setEndpoint(java.lang.String endpoint)
Sets the zipkin endpoint.
|
ZipkinSpanExporter.Builder |
setSender(zipkin2.reporter.Sender sender)
Sets the Zipkin sender.
|
ZipkinSpanExporter.Builder |
setServiceName(java.lang.String serviceName)
Label of the remote node in the service graph, such as "favstar".
|
public ZipkinSpanExporter.Builder setServiceName(java.lang.String serviceName)
This is a primary label for trace lookup and aggregation, so it should be intuitive and consistent. Many use a name from service discovery.
Note: this value, will be superseded by the value of ResourceAttributes.SERVICE_NAME
if it has been set in the
Resource
associated with the Tracer that created the
spans.
This property is required to be set.
serviceName
- The service name. It defaults to "unknown".Resource
,
ResourceAttributes
public ZipkinSpanExporter.Builder setSender(zipkin2.reporter.Sender sender)
OkHttpSender
is a good default.
The Component.close()
method will be called when the exporter is shut down.
sender
- the Zipkin sender implementation.public ZipkinSpanExporter.Builder setEncoder(zipkin2.codec.BytesEncoder<zipkin2.Span> encoder)
BytesEncoder
, which controls the format used by the Sender
. Defaults
to the SpanBytesEncoder.JSON_V2
.encoder
- the BytesEncoder
to use.SpanBytesEncoder
public ZipkinSpanExporter.Builder setEndpoint(java.lang.String endpoint)
OkHttpSender
instance to this builder.endpoint
- The Zipkin endpoint URL, ex. "http://zipkinhost:9411/api/v2/spans".OkHttpSender
protected ZipkinSpanExporter.Builder fromConfigMap(java.util.Map<java.lang.String,java.lang.String> configMap, io.opentelemetry.sdk.common.export.ConfigBuilder.NamingConvention namingConvention)
fromConfigMap
in class io.opentelemetry.sdk.common.export.ConfigBuilder<ZipkinSpanExporter.Builder>
configMap
- Map
holding the configuration values.public ZipkinSpanExporter build()
ZipkinSpanExporter
.ZipkinSpanExporter
.