Search in sources :

Example 1 with ZipkinSpanExporterBuilder

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();
}
Also used : Duration(java.time.Duration) ZipkinSpanExporterBuilder(io.opentelemetry.exporter.zipkin.ZipkinSpanExporterBuilder)

Aggregations

ZipkinSpanExporterBuilder (io.opentelemetry.exporter.zipkin.ZipkinSpanExporterBuilder)1 Duration (java.time.Duration)1