Search in sources :

Example 1 with JaegerGrpcSpanExporterBuilder

use of io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporterBuilder in project opentelemetry-java by open-telemetry.

the class SpanExporterConfiguration method configureJaeger.

private static SpanExporter configureJaeger(ConfigProperties config) {
    ClasspathUtil.checkClassExists("io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporter", "Jaeger gRPC Exporter", "opentelemetry-exporter-jaeger");
    JaegerGrpcSpanExporterBuilder builder = JaegerGrpcSpanExporter.builder();
    String endpoint = config.getString("otel.exporter.jaeger.endpoint");
    if (endpoint != null) {
        builder.setEndpoint(endpoint);
    }
    Duration timeout = config.getDuration("otel.exporter.jaeger.timeout");
    if (timeout != null) {
        builder.setTimeout(timeout);
    }
    return builder.build();
}
Also used : Duration(java.time.Duration) JaegerGrpcSpanExporterBuilder(io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporterBuilder)

Aggregations

JaegerGrpcSpanExporterBuilder (io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporterBuilder)1 Duration (java.time.Duration)1