From 749d3164cce52a81a5d52882c4a5f716cfd2f3a3 Mon Sep 17 00:00:00 2001 From: jack-berg <34418638+jack-berg@users.noreply.github.com> Date: Sat, 1 Jul 2023 07:23:18 -0500 Subject: [PATCH] Deprecate jaeger exporters (#5190) --- README.md | 11 +++++++++-- .../opentelemetry-exporter-jaeger-thrift.txt | 7 ++++++- .../opentelemetry-exporter-jaeger.txt | 7 ++++++- .../jaeger/thrift/JaegerThriftSpanExporter.java | 9 ++++++++- .../thrift/JaegerThriftSpanExporterBuilder.java | 9 ++++++++- .../jaeger/thrift/JaegerThriftIntegrationTest.java | 1 + .../jaeger/thrift/JaegerThriftSpanExporterTest.java | 1 + .../exporter/jaeger/JaegerGrpcSpanExporter.java | 9 ++++++++- .../jaeger/JaegerGrpcSpanExporterBuilder.java | 9 ++++++++- .../internal/JaegerGrpcSpanExporterProvider.java | 13 +++++++++---- .../exporter/jaeger/JaegerGrpcSpanExporterTest.java | 1 + .../exporter/jaeger/JaegerIntegrationTest.java | 1 + .../JaegerGrpcSpanExporterProviderTest.java | 8 +++++--- .../SpanExporterConfigurationTest.java | 4 ++-- .../opentelemetry/sdk/trace/ExporterBenchmark.java | 7 ++++--- 15 files changed, 77 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 905ebc82b0c..c70b4034963 100644 --- a/README.md +++ b/README.md @@ -253,13 +253,20 @@ dependency as follows, replacing `{{artifact-id}}` with the value from the "Arti |-----------------------------------------------------|-------------------------------------------------------------------------------------|---------------------------------------|-------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [OTLP Exporters](./exporters/otlp/all) | OTLP gRPC & HTTP exporters, including traces, metrics, and logs | `opentelemetry-exporter-otlp` | 1.27.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-otlp.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp) | | [OTLP Common](./exporters/otlp/common) | Shared OTLP components (internal) | `opentelemetry-exporter-otlp-common` | 1.27.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-otlp-common.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp-common) | -| [Jaeger gRPC Exporter](./exporters/jaeger) | Jaeger gRPC trace exporter | `opentelemetry-exporter-jaeger` | 1.27.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-jaeger.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-jaeger) | -| [Jaeger Thrift Exporter](./exporters/jaeger-thrift) | Jaeger thrift trace exporter | `opentelemetry-exporter-jaeger-thift` | 1.27.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-jaeger-thrift.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-jaeger-thrift) | +| [Jaeger gRPC Exporter](./exporters/jaeger) | Jaeger gRPC trace exporter (deprecated [1]) | `opentelemetry-exporter-jaeger` | 1.27.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-jaeger.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-jaeger) | +| [Jaeger Thrift Exporter](./exporters/jaeger-thrift) | Jaeger thrift trace exporter (deprecated [1]) | `opentelemetry-exporter-jaeger-thift` | 1.27.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-jaeger-thrift.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-jaeger-thrift) | | [Logging Exporter](./exporters/logging) | Logging exporters, including metrics, traces, and logs | `opentelemetry-exporter-logging` | 1.27.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-logging.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-logging) | | [Zipkin Exporter](./exporters/zipkin) | Zipkin trace exporter | `opentelemetry-exporter-zipkin` | 1.27.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-zipkin.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-zipkin) | | [Prometheus Exporter](./exporters/prometheus) | Prometheus metric exporter | `opentelemetry-exporter-prometheus` | 1.27.0-alpha | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-prometheus.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-prometheus) | | [Exporter Common](./exporters/common) | Shared exporter components (internal) | `opentelemetry-exporter-common` | 1.27.0 | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-common.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-common) | +**[1]**: Jaeger now +has [native support for OTLP](https://opentelemetry.io/blog/2022/jaeger-native-otlp/) and jaeger +exporters are now deprecated. `opentelemetry-exporter-jaeger-thrift` will continue to be published +until 1.34.0 (January 2024) but no new PRs will be accepted except security related bugfixes. After +1.34.0, `io.opentelemetry:opentelemetry-bom` will reference the last published version, but no +additional versions will be published. + ### SDK Extensions | Component | Description | Artifact ID | Version | Javadoc | diff --git a/docs/apidiffs/current_vs_latest/opentelemetry-exporter-jaeger-thrift.txt b/docs/apidiffs/current_vs_latest/opentelemetry-exporter-jaeger-thrift.txt index df26146497b..d7bd0f79772 100644 --- a/docs/apidiffs/current_vs_latest/opentelemetry-exporter-jaeger-thrift.txt +++ b/docs/apidiffs/current_vs_latest/opentelemetry-exporter-jaeger-thrift.txt @@ -1,2 +1,7 @@ Comparing source compatibility of against -No changes. \ No newline at end of file +=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.exporter.jaeger.thrift.JaegerThriftSpanExporter (not serializable) + === CLASS FILE FORMAT VERSION: 52.0 <- 52.0 + +++ NEW ANNOTATION: java.lang.Deprecated +=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.exporter.jaeger.thrift.JaegerThriftSpanExporterBuilder (not serializable) + === CLASS FILE FORMAT VERSION: 52.0 <- 52.0 + +++ NEW ANNOTATION: java.lang.Deprecated diff --git a/docs/apidiffs/current_vs_latest/opentelemetry-exporter-jaeger.txt b/docs/apidiffs/current_vs_latest/opentelemetry-exporter-jaeger.txt index df26146497b..8268b5941c9 100644 --- a/docs/apidiffs/current_vs_latest/opentelemetry-exporter-jaeger.txt +++ b/docs/apidiffs/current_vs_latest/opentelemetry-exporter-jaeger.txt @@ -1,2 +1,7 @@ Comparing source compatibility of against -No changes. \ No newline at end of file +=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporter (not serializable) + === CLASS FILE FORMAT VERSION: 52.0 <- 52.0 + +++ NEW ANNOTATION: java.lang.Deprecated +=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporterBuilder (not serializable) + === CLASS FILE FORMAT VERSION: 52.0 <- 52.0 + +++ NEW ANNOTATION: java.lang.Deprecated diff --git a/exporters/jaeger-thrift/src/main/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftSpanExporter.java b/exporters/jaeger-thrift/src/main/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftSpanExporter.java index d835e5b3498..160d6fbc9cd 100644 --- a/exporters/jaeger-thrift/src/main/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftSpanExporter.java +++ b/exporters/jaeger-thrift/src/main/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftSpanExporter.java @@ -29,8 +29,15 @@ import java.util.stream.Collectors; import javax.annotation.concurrent.ThreadSafe; -/** Exports spans to Jaeger via Thrift, using Jaeger's thrift model. */ +/** + * Exports spans to Jaeger via Thrift, using Jaeger's thrift model. + * + * @deprecated Use {@code OtlpGrpcSpanExporter} or {@code OtlpHttpSpanExporter} from opentelemetry-exporter-otlp + * instead. + */ @ThreadSafe +@Deprecated public final class JaegerThriftSpanExporter implements SpanExporter { static final String DEFAULT_ENDPOINT = "http://localhost:14268/api/traces"; 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 eb7963a6dcd..faa88e53a21 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 @@ -10,7 +10,14 @@ import javax.annotation.Nullable; import org.apache.thrift.transport.TTransportException; -/** Builder utility for this exporter. */ +/** + * Builder utility for this exporter. + * + * @deprecated Use {@code OtlpGrpcSpanExporter} or {@code OtlpHttpSpanExporter} from opentelemetry-exporter-otlp + * instead. + */ +@Deprecated public final class JaegerThriftSpanExporterBuilder { private String endpoint = JaegerThriftSpanExporter.DEFAULT_ENDPOINT; diff --git a/exporters/jaeger-thrift/src/test/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftIntegrationTest.java b/exporters/jaeger-thrift/src/test/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftIntegrationTest.java index 30557d0a1f4..f8589c91c6a 100644 --- a/exporters/jaeger-thrift/src/test/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftIntegrationTest.java +++ b/exporters/jaeger-thrift/src/test/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftIntegrationTest.java @@ -33,6 +33,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; @Testcontainers(disabledWithoutDocker = true) +@SuppressWarnings("deprecation") // Testing deprecated code class JaegerThriftIntegrationTest { private static final OkHttpClient client = new OkHttpClient(); diff --git a/exporters/jaeger-thrift/src/test/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftSpanExporterTest.java b/exporters/jaeger-thrift/src/test/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftSpanExporterTest.java index c199a864ab3..361754b5082 100644 --- a/exporters/jaeger-thrift/src/test/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftSpanExporterTest.java +++ b/exporters/jaeger-thrift/src/test/java/io/opentelemetry/exporter/jaeger/thrift/JaegerThriftSpanExporterTest.java @@ -46,6 +46,7 @@ import org.mockito.junit.jupiter.MockitoExtension; @ExtendWith(MockitoExtension.class) +@SuppressWarnings("deprecation") // Testing deprecated code class JaegerThriftSpanExporterTest { private static final String TRACE_ID = "a0000000000000000000000000abc123"; diff --git a/exporters/jaeger/src/main/java/io/opentelemetry/exporter/jaeger/JaegerGrpcSpanExporter.java b/exporters/jaeger/src/main/java/io/opentelemetry/exporter/jaeger/JaegerGrpcSpanExporter.java index 9829968a3e8..acaa3ea42ad 100644 --- a/exporters/jaeger/src/main/java/io/opentelemetry/exporter/jaeger/JaegerGrpcSpanExporter.java +++ b/exporters/jaeger/src/main/java/io/opentelemetry/exporter/jaeger/JaegerGrpcSpanExporter.java @@ -19,8 +19,15 @@ import java.util.stream.Collectors; import javax.annotation.concurrent.ThreadSafe; -/** Exports spans to Jaeger via gRPC, using Jaeger's protobuf model. */ +/** + * Exports spans to Jaeger via gRPC, using Jaeger's protobuf model. + * + * @deprecated Use {@code OtlpGrpcSpanExporter} or {@code OtlpHttpSpanExporter} from opentelemetry-exporter-otlp + * instead. + */ @ThreadSafe +@Deprecated public final class JaegerGrpcSpanExporter implements SpanExporter { private static final String DEFAULT_HOST_NAME = "unknown"; diff --git a/exporters/jaeger/src/main/java/io/opentelemetry/exporter/jaeger/JaegerGrpcSpanExporterBuilder.java b/exporters/jaeger/src/main/java/io/opentelemetry/exporter/jaeger/JaegerGrpcSpanExporterBuilder.java index 0fb7c566173..06f8a36caec 100644 --- a/exporters/jaeger/src/main/java/io/opentelemetry/exporter/jaeger/JaegerGrpcSpanExporterBuilder.java +++ b/exporters/jaeger/src/main/java/io/opentelemetry/exporter/jaeger/JaegerGrpcSpanExporterBuilder.java @@ -19,7 +19,14 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.X509TrustManager; -/** Builder utility for this exporter. */ +/** + * Builder utility for this exporter. + * + * @deprecated Use {@code OtlpGrpcSpanExporter} or {@code OtlpHttpSpanExporter} from opentelemetry-exporter-otlp + * instead. + */ +@Deprecated public final class JaegerGrpcSpanExporterBuilder { private static final String GRPC_SERVICE_NAME = "jaeger.api_v2.CollectorService"; diff --git a/exporters/jaeger/src/main/java/io/opentelemetry/exporter/jaeger/internal/JaegerGrpcSpanExporterProvider.java b/exporters/jaeger/src/main/java/io/opentelemetry/exporter/jaeger/internal/JaegerGrpcSpanExporterProvider.java index 7d482ee394b..bf3ba40b477 100644 --- a/exporters/jaeger/src/main/java/io/opentelemetry/exporter/jaeger/internal/JaegerGrpcSpanExporterProvider.java +++ b/exporters/jaeger/src/main/java/io/opentelemetry/exporter/jaeger/internal/JaegerGrpcSpanExporterProvider.java @@ -5,19 +5,23 @@ package io.opentelemetry.exporter.jaeger.internal; -import io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporter; -import io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporterBuilder; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider; import io.opentelemetry.sdk.trace.export.SpanExporter; import java.time.Duration; /** - * {@link SpanExporter} SPI implementation for {@link JaegerGrpcSpanExporter}. + * {@link SpanExporter} SPI implementation for {@link + * io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporter}. * *
This class is internal and is hence not for public use. Its APIs are unstable and can change
* at any time.
+ *
+ * @deprecated Use {@code OtlpGrpcSpanExporter} or {@code OtlpHttpSpanExporter} from opentelemetry-exporter-otlp
+ * instead.
*/
+@Deprecated
public class JaegerGrpcSpanExporterProvider implements ConfigurableSpanExporterProvider {
@Override
public String getName() {
@@ -26,7 +30,8 @@ public String getName() {
@Override
public SpanExporter createExporter(ConfigProperties config) {
- JaegerGrpcSpanExporterBuilder builder = JaegerGrpcSpanExporter.builder();
+ io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporterBuilder builder =
+ io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporter.builder();
String endpoint = config.getString("otel.exporter.jaeger.endpoint");
if (endpoint != null) {
diff --git a/exporters/jaeger/src/test/java/io/opentelemetry/exporter/jaeger/JaegerGrpcSpanExporterTest.java b/exporters/jaeger/src/test/java/io/opentelemetry/exporter/jaeger/JaegerGrpcSpanExporterTest.java
index 88cbd138e37..2a63201ff06 100644
--- a/exporters/jaeger/src/test/java/io/opentelemetry/exporter/jaeger/JaegerGrpcSpanExporterTest.java
+++ b/exporters/jaeger/src/test/java/io/opentelemetry/exporter/jaeger/JaegerGrpcSpanExporterTest.java
@@ -62,6 +62,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+@SuppressWarnings("deprecation") // Testing deprecated code
class JaegerGrpcSpanExporterTest {
private static final BlockingQueue