Skip to content

Commit

Permalink
Deprecate jaeger exporters (#5190)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg authored Jul 1, 2023
1 parent 1872724 commit 749d316
Show file tree
Hide file tree
Showing 15 changed files with 77 additions and 20 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` | <!--VERSION_STABLE-->1.27.0<!--/VERSION_STABLE--> | [![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` | <!--VERSION_STABLE-->1.27.0<!--/VERSION_STABLE--> | [![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` | <!--VERSION_STABLE-->1.27.0<!--/VERSION_STABLE--> | [![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` | <!--VERSION_STABLE-->1.27.0<!--/VERSION_STABLE--> | [![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` | <!--VERSION_STABLE-->1.27.0<!--/VERSION_STABLE--> | [![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` | <!--VERSION_STABLE-->1.27.0<!--/VERSION_STABLE--> | [![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` | <!--VERSION_STABLE-->1.27.0<!--/VERSION_STABLE--> | [![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` | <!--VERSION_STABLE-->1.27.0<!--/VERSION_STABLE--> | [![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` | <!--VERSION_UNSTABLE-->1.27.0-alpha<!--/VERSION_UNSTABLE--> | [![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` | <!--VERSION_STABLE-->1.27.0<!--/VERSION_STABLE--> | [![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 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
Comparing source compatibility of against
No changes.
=== 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
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
Comparing source compatibility of against
No changes.
=== 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
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a
* href="https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/otlp/all">opentelemetry-exporter-otlp</a>
* instead.
*/
@ThreadSafe
@Deprecated
public final class JaegerThriftSpanExporter implements SpanExporter {

static final String DEFAULT_ENDPOINT = "http://localhost:14268/api/traces";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a
* href="https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/otlp/all">opentelemetry-exporter-otlp</a>
* instead.
*/
@Deprecated
public final class JaegerThriftSpanExporterBuilder {

private String endpoint = JaegerThriftSpanExporter.DEFAULT_ENDPOINT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a
* href="https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/otlp/all">opentelemetry-exporter-otlp</a>
* instead.
*/
@ThreadSafe
@Deprecated
public final class JaegerGrpcSpanExporter implements SpanExporter {

private static final String DEFAULT_HOST_NAME = "unknown";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a
* href="https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/otlp/all">opentelemetry-exporter-otlp</a>
* instead.
*/
@Deprecated
public final class JaegerGrpcSpanExporterBuilder {

private static final String GRPC_SERVICE_NAME = "jaeger.api_v2.CollectorService";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
*
* <p>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 <a
* href="https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/otlp/all">opentelemetry-exporter-otlp</a>
* instead.
*/
@Deprecated
public class JaegerGrpcSpanExporterProvider implements ConfigurableSpanExporterProvider {
@Override
public String getName() {
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Collector.PostSpansRequest> postedRequests =
new LinkedBlockingDeque<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.testcontainers.junit.jupiter.Testcontainers;

@Testcontainers(disabledWithoutDocker = true)
@SuppressWarnings("deprecation") // Testing deprecated code
class JaegerIntegrationTest {
private static final OkHttpClient client = new OkHttpClient();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import static org.assertj.core.api.Assertions.assertThat;

import io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporter;
import io.opentelemetry.sdk.autoconfigure.spi.internal.DefaultConfigProperties;
import io.opentelemetry.sdk.trace.export.SpanExporter;
import java.util.Collections;
Expand All @@ -16,6 +15,7 @@
import okhttp3.HttpUrl;
import org.junit.jupiter.api.Test;

@SuppressWarnings("deprecation") // Testing deprecated code
class JaegerGrpcSpanExporterProviderTest {

private static final JaegerGrpcSpanExporterProvider provider =
Expand All @@ -30,7 +30,8 @@ void getName() {
void createExporter_Default() {
try (SpanExporter spanExporter =
provider.createExporter(DefaultConfigProperties.createForTest(Collections.emptyMap()))) {
assertThat(spanExporter).isInstanceOf(JaegerGrpcSpanExporter.class);
assertThat(spanExporter)
.isInstanceOf(io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporter.class);
assertThat(spanExporter)
.extracting("delegate")
.extracting("client")
Expand All @@ -52,7 +53,8 @@ void createExporter_WithConfiguration() {

try (SpanExporter spanExporter =
provider.createExporter(DefaultConfigProperties.createForTest(config))) {
assertThat(spanExporter).isInstanceOf(JaegerGrpcSpanExporter.class);
assertThat(spanExporter)
.isInstanceOf(io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporter.class);
assertThat(spanExporter)
.extracting("delegate")
.extracting("client")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import static org.assertj.core.api.Assertions.assertThatThrownBy;

import com.google.common.collect.ImmutableMap;
import io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporter;
import io.opentelemetry.exporter.logging.LoggingSpanExporter;
import io.opentelemetry.exporter.logging.otlp.OtlpJsonLoggingSpanExporter;
import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter;
Expand All @@ -24,14 +23,15 @@
class SpanExporterConfigurationTest {

@Test
@SuppressWarnings("deprecation") // Testing deprecated jaeger exporter
void configureExporter_KnownSpiExportersOnClasspath() {
NamedSpiManager<SpanExporter> spiExportersManager =
SpanExporterConfiguration.spanExporterSpiManager(
DefaultConfigProperties.createForTest(Collections.emptyMap()),
SpanExporterConfigurationTest.class.getClassLoader());

assertThat(SpanExporterConfiguration.configureExporter("jaeger", spiExportersManager))
.isInstanceOf(JaegerGrpcSpanExporter.class);
.isInstanceOf(io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporter.class);
assertThat(SpanExporterConfiguration.configureExporter("logging", spiExportersManager))
.isInstanceOf(LoggingSpanExporter.class);
assertThat(SpanExporterConfiguration.configureExporter("logging-otlp", spiExportersManager))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import io.opentelemetry.api.trace.Span;
import io.opentelemetry.api.trace.Tracer;
import io.opentelemetry.exporter.jaeger.thrift.JaegerThriftSpanExporter;
import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter;
import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor;
import io.opentelemetry.sdk.trace.export.SpanExporter;
Expand Down Expand Up @@ -94,12 +93,14 @@ protected OtlpGrpcSpanExporter createExporter(GenericContainer<?> collector) {
}
}

@SuppressWarnings("deprecation") // Benchmarking deprecated code
public static class JaegerBenchmark extends AbstractProcessorBenchmark {
@Override
protected JaegerThriftSpanExporter createExporter(GenericContainer<?> collector) {
protected io.opentelemetry.exporter.jaeger.thrift.JaegerThriftSpanExporter createExporter(
GenericContainer<?> collector) {
String host = collector.getHost();
int port = collector.getMappedPort(JAEGER_PORT);
return JaegerThriftSpanExporter.builder()
return io.opentelemetry.exporter.jaeger.thrift.JaegerThriftSpanExporter.builder()
.setEndpoint("http://" + host + ":" + port + "/api/traces")
.build();
}
Expand Down

0 comments on commit 749d316

Please sign in to comment.