From ccb03c8c7080681ef9e6165fbe708431f602d917 Mon Sep 17 00:00:00 2001 From: John Watson Date: Wed, 21 Apr 2021 20:15:08 -0700 Subject: [PATCH] update the jaeger-client dependency to the latest (#3172) --- dependencyManagement/build.gradle.kts | 2 +- .../jaeger/thrift/JaegerThriftSpanExporterBuilder.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dependencyManagement/build.gradle.kts b/dependencyManagement/build.gradle.kts index 70376bef850..6737f22cf27 100644 --- a/dependencyManagement/build.gradle.kts +++ b/dependencyManagement/build.gradle.kts @@ -83,7 +83,7 @@ val DEPENDENCIES = listOf( "edu.berkeley.cs.jqf:jqf-fuzz:1.6", "eu.rekawek.toxiproxy:toxiproxy-java:2.1.4", "io.github.netmikey.logunit:logunit-jul:1.1.0", - "io.jaegertracing:jaeger-client:1.5.0", + "io.jaegertracing:jaeger-client:1.6.0", "io.opentracing:opentracing-api:0.33.0", "io.zipkin.zipkin2:zipkin-junit:2.23.2", "junit:junit:4.13.2", diff --git a/exporters/jaeger-thrift/src/main/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftSpanExporterBuilder.java b/exporters/jaeger-thrift/src/main/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftSpanExporterBuilder.java index abbaee5fbdf..75a8471e8a8 100644 --- a/exporters/jaeger-thrift/src/main/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftSpanExporterBuilder.java +++ b/exporters/jaeger-thrift/src/main/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftSpanExporterBuilder.java @@ -7,6 +7,7 @@ import io.jaegertracing.thrift.internal.senders.HttpSender; import io.jaegertracing.thrift.internal.senders.ThriftSender; +import org.apache.thrift.transport.TTransportException; /** Builder utility for this exporter. */ public final class JaegerThriftSpanExporterBuilder { @@ -46,7 +47,11 @@ public JaegerThriftSpanExporterBuilder setEndpoint(String endpoint) { */ public JaegerThriftSpanExporter build() { if (thriftSender == null) { - thriftSender = new HttpSender.Builder(endpoint).build(); + try { + thriftSender = new HttpSender.Builder(endpoint).build(); + } catch (TTransportException e) { + throw new IllegalStateException("Failed to construct a thrift HttpSender.", e); + } } return new JaegerThriftSpanExporter(thriftSender); }