use of io.opentelemetry.exporter.zipkin.ZipkinSpanExporterBuilder in project opentelemetry-java by open-telemetry.
the class SpanExporterConfiguration method configureZipkin.
private static SpanExporter configureZipkin(ConfigProperties config) {
ClasspathUtil.checkClassExists("io.opentelemetry.exporter.zipkin.ZipkinSpanExporter", "Zipkin Exporter", "opentelemetry-exporter-zipkin");
ZipkinSpanExporterBuilder builder = ZipkinSpanExporter.builder();
String endpoint = config.getString("otel.exporter.zipkin.endpoint");
if (endpoint != null) {
builder.setEndpoint(endpoint);
}
Duration timeout = config.getDuration("otel.exporter.zipkin.timeout");
if (timeout != null) {
builder.setReadTimeout(timeout);
}
return builder.build();
}
Aggregations