diff --git a/README.md b/README.md index 6b0310e387f..9789e02cfe4 100644 --- a/README.md +++ b/README.md @@ -265,6 +265,7 @@ dependency as follows, replacing `{{artifact-id}}` with the value from the "Arti | [OTLP Logging Exporter](./exporters/logging-otlp) | Logging exporters in OTLP protobuf JSON format, including metrics, traces, and logs | `opentelemetry-exporter-logging-otlp` | 1.16.0 | | [Zipkin Exporter](./exporters/zipkin) | Zipkin trace exporter | `opentelemetry-exporter-zipkin` | 1.16.0 | | [Prometheus Exporter](./exporters/prometheus) | Prometheus metric exporter | `opentelemetry-exporter-prometheus` | 1.16.0-alpha | +| [Exporter Common](./exporters/common) | Shared exporter components (internal) | `opentelemetry-exporter-common` | TODO: add version once published in 1.17.0 | ### SDK Extensions diff --git a/docs/apidiffs/current_vs_latest/opentelemetry-exporter-common.txt b/docs/apidiffs/current_vs_latest/opentelemetry-exporter-common.txt new file mode 100644 index 00000000000..df26146497b --- /dev/null +++ b/docs/apidiffs/current_vs_latest/opentelemetry-exporter-common.txt @@ -0,0 +1,2 @@ +Comparing source compatibility of against +No changes. \ No newline at end of file diff --git a/exporters/common/README.md b/exporters/common/README.md new file mode 100644 index 00000000000..5d71430241c --- /dev/null +++ b/exporters/common/README.md @@ -0,0 +1,8 @@ +# OpenTelemetry - Exporter Common + + diff --git a/exporters/common/build.gradle.kts b/exporters/common/build.gradle.kts new file mode 100644 index 00000000000..0e913aa389c --- /dev/null +++ b/exporters/common/build.gradle.kts @@ -0,0 +1,39 @@ +plugins { + id("otel.java-conventions") + id("otel.publish-conventions") + + id("otel.animalsniffer-conventions") +} + +description = "OpenTelemetry Exporter Common" +otelJava.moduleName.set("io.opentelemetry.exporter.internal") + +val versions: Map by project +dependencies { + api(project(":api:all")) + + compileOnly(project(":sdk:common")) + + compileOnly("org.codehaus.mojo:animal-sniffer-annotations") + + annotationProcessor("com.google.auto.value:auto-value") + + // We include helpers shared by gRPC or okhttp exporters but do not want to impose these + // dependency on all of our consumers. + compileOnly("com.fasterxml.jackson.core:jackson-core") + compileOnly("com.squareup.okhttp3:okhttp") + compileOnly("io.grpc:grpc-netty") + compileOnly("io.grpc:grpc-netty-shaded") + compileOnly("io.grpc:grpc-okhttp") + compileOnly("io.grpc:grpc-stub") + + testImplementation(project(":sdk:common")) + + testImplementation("com.google.protobuf:protobuf-java-util") + testImplementation("com.squareup.okhttp3:okhttp") + testImplementation("com.linecorp.armeria:armeria-junit5") + testImplementation("org.skyscreamer:jsonassert") + testImplementation("com.google.api.grpc:proto-google-common-protos") + testImplementation("io.grpc:grpc-testing") + testRuntimeOnly("io.grpc:grpc-netty-shaded") +} diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/ExporterBuilderUtil.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/ExporterBuilderUtil.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/ExporterBuilderUtil.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/ExporterBuilderUtil.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/ExporterMetrics.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/ExporterMetrics.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/ExporterMetrics.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/ExporterMetrics.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/TlsUtil.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/TlsUtil.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/TlsUtil.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/TlsUtil.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/auth/Authenticator.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/auth/Authenticator.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/auth/Authenticator.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/auth/Authenticator.java diff --git a/exporters/common/src/main/java/io/opentelemetry/exporter/internal/auth/package-info.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/auth/package-info.java new file mode 100644 index 00000000000..1d79565d574 --- /dev/null +++ b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/auth/package-info.java @@ -0,0 +1,10 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +/** Utilities for exporter authentication. */ +@ParametersAreNonnullByDefault +package io.opentelemetry.exporter.internal.auth; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporter.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporter.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporter.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporter.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporterBuilder.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporterBuilder.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporterBuilder.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporterBuilder.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporterUtil.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporterUtil.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporterUtil.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporterUtil.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcRequestBody.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcRequestBody.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcRequestBody.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcRequestBody.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcStatusUtil.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcStatusUtil.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcStatusUtil.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcStatusUtil.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/ManagedChannelUtil.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/ManagedChannelUtil.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/ManagedChannelUtil.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/ManagedChannelUtil.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/MarshalerInputStream.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/MarshalerInputStream.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/MarshalerInputStream.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/MarshalerInputStream.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/MarshalerServiceStub.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/MarshalerServiceStub.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/MarshalerServiceStub.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/MarshalerServiceStub.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/OkHttpGrpcExporter.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/OkHttpGrpcExporter.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/OkHttpGrpcExporter.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/OkHttpGrpcExporter.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/UpstreamGrpcExporter.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/UpstreamGrpcExporter.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/UpstreamGrpcExporter.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/UpstreamGrpcExporter.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/package-info.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/package-info.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/package-info.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/package-info.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/CodedInputStream.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/CodedInputStream.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/CodedInputStream.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/CodedInputStream.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/CodedOutputStream.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/CodedOutputStream.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/CodedOutputStream.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/CodedOutputStream.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/JsonSerializer.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/JsonSerializer.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/JsonSerializer.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/JsonSerializer.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Marshaler.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Marshaler.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Marshaler.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Marshaler.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/MarshalerUtil.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/MarshalerUtil.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/MarshalerUtil.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/MarshalerUtil.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/MarshalerWithSize.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/MarshalerWithSize.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/MarshalerWithSize.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/MarshalerWithSize.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoEnumInfo.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoEnumInfo.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoEnumInfo.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoEnumInfo.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoFieldInfo.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoFieldInfo.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoFieldInfo.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoFieldInfo.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoSerializer.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoSerializer.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoSerializer.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoSerializer.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Serializer.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Serializer.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Serializer.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Serializer.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/WireFormat.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/WireFormat.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/WireFormat.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/WireFormat.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/package-info.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/package-info.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/marshal/package-info.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/package-info.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/JsonRequestBody.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/JsonRequestBody.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/JsonRequestBody.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/JsonRequestBody.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/OkHttpExporter.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/OkHttpExporter.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/OkHttpExporter.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/OkHttpExporter.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/OkHttpExporterBuilder.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/OkHttpExporterBuilder.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/OkHttpExporterBuilder.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/OkHttpExporterBuilder.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/OkHttpUtil.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/OkHttpUtil.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/OkHttpUtil.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/OkHttpUtil.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/ProtoRequestBody.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/ProtoRequestBody.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/ProtoRequestBody.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/ProtoRequestBody.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/package-info.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/package-info.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/package-info.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/okhttp/package-info.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/package-info.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/package-info.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/package-info.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/package-info.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryInterceptor.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryInterceptor.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryInterceptor.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryInterceptor.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryPolicy.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryPolicy.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryPolicy.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryPolicy.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryPolicyBuilder.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryPolicyBuilder.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryPolicyBuilder.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryPolicyBuilder.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryUtil.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryUtil.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryUtil.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/retry/RetryUtil.java diff --git a/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/retry/package-info.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/retry/package-info.java similarity index 100% rename from exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/retry/package-info.java rename to exporters/common/src/main/java/io/opentelemetry/exporter/internal/retry/package-info.java diff --git a/exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/auth/AuthenticatingExporterTest.java b/exporters/common/src/test/java/io/opentelemetry/exporter/internal/auth/AuthenticatingExporterTest.java similarity index 100% rename from exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/auth/AuthenticatingExporterTest.java rename to exporters/common/src/test/java/io/opentelemetry/exporter/internal/auth/AuthenticatingExporterTest.java diff --git a/exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/auth/AuthenticatorTest.java b/exporters/common/src/test/java/io/opentelemetry/exporter/internal/auth/AuthenticatorTest.java similarity index 100% rename from exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/auth/AuthenticatorTest.java rename to exporters/common/src/test/java/io/opentelemetry/exporter/internal/auth/AuthenticatorTest.java diff --git a/exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/grpc/GrpcStatusUtilTest.java b/exporters/common/src/test/java/io/opentelemetry/exporter/internal/grpc/GrpcStatusUtilTest.java similarity index 100% rename from exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/grpc/GrpcStatusUtilTest.java rename to exporters/common/src/test/java/io/opentelemetry/exporter/internal/grpc/GrpcStatusUtilTest.java diff --git a/exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/grpc/ManagedChannelUtilTest.java b/exporters/common/src/test/java/io/opentelemetry/exporter/internal/grpc/ManagedChannelUtilTest.java similarity index 100% rename from exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/grpc/ManagedChannelUtilTest.java rename to exporters/common/src/test/java/io/opentelemetry/exporter/internal/grpc/ManagedChannelUtilTest.java diff --git a/exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/retry/RetryInterceptorTest.java b/exporters/common/src/test/java/io/opentelemetry/exporter/internal/retry/RetryInterceptorTest.java similarity index 100% rename from exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/retry/RetryInterceptorTest.java rename to exporters/common/src/test/java/io/opentelemetry/exporter/internal/retry/RetryInterceptorTest.java diff --git a/exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/retry/RetryPolicyTest.java b/exporters/common/src/test/java/io/opentelemetry/exporter/internal/retry/RetryPolicyTest.java similarity index 100% rename from exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/retry/RetryPolicyTest.java rename to exporters/common/src/test/java/io/opentelemetry/exporter/internal/retry/RetryPolicyTest.java diff --git a/exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/retry/RetryUtilTest.java b/exporters/common/src/test/java/io/opentelemetry/exporter/internal/retry/RetryUtilTest.java similarity index 100% rename from exporters/otlp/common/src/test/java/io/opentelemetry/exporter/internal/retry/RetryUtilTest.java rename to exporters/common/src/test/java/io/opentelemetry/exporter/internal/retry/RetryUtilTest.java diff --git a/exporters/jaeger/build.gradle.kts b/exporters/jaeger/build.gradle.kts index da02611162b..bb94c73dd46 100644 --- a/exporters/jaeger/build.gradle.kts +++ b/exporters/jaeger/build.gradle.kts @@ -15,13 +15,12 @@ dependencies { protoSource(project(":exporters:jaeger-proto")) - // TODO(anuraaga): otlp-common has a lot of code not specific to OTLP now. As it's just internal - // code, this mysterious dependency is possibly still OK but we may need a rename or splitting. - implementation(project(":exporters:otlp:common")) + implementation(project(":exporters:common")) implementation(project(":semconv")) compileOnly("io.grpc:grpc-stub") + implementation("com.squareup.okhttp3:okhttp") implementation("com.fasterxml.jackson.jr:jackson-jr-objects") testImplementation(project(":exporters:jaeger-proto")) diff --git a/exporters/otlp/common/build.gradle.kts b/exporters/otlp/common/build.gradle.kts index ac90d2ff965..92bbc4ae27d 100644 --- a/exporters/otlp/common/build.gradle.kts +++ b/exporters/otlp/common/build.gradle.kts @@ -15,7 +15,7 @@ val versions: Map by project dependencies { protoSource("io.opentelemetry.proto:opentelemetry-proto:${versions["io.opentelemetry.proto"]}") - api(project(":api:all")) + api(project(":exporters:common")) compileOnly(project(":sdk:metrics")) compileOnly(project(":sdk:trace")) @@ -23,18 +23,6 @@ dependencies { implementation("com.squareup.okhttp3:okhttp") - compileOnly("org.codehaus.mojo:animal-sniffer-annotations") - - // We include helpers shared by gRPC or okhttp exporters but do not want to impose these - // dependency on all of our consumers. - compileOnly("com.fasterxml.jackson.core:jackson-core") - compileOnly("io.grpc:grpc-netty") - compileOnly("io.grpc:grpc-netty-shaded") - compileOnly("io.grpc:grpc-okhttp") - compileOnly("io.grpc:grpc-stub") - - annotationProcessor("com.google.auto.value:auto-value") - testImplementation(project(":sdk:metrics")) testImplementation(project(":sdk:trace")) testImplementation(project(":sdk:logs")) @@ -43,20 +31,13 @@ dependencies { testImplementation("com.fasterxml.jackson.core:jackson-databind") testImplementation("com.google.protobuf:protobuf-java-util") - testImplementation("com.linecorp.armeria:armeria-junit5") testImplementation("io.opentelemetry.proto:opentelemetry-proto") - testImplementation("org.skyscreamer:jsonassert") - testImplementation("org.assertj:assertj-core") - - testImplementation("com.google.api.grpc:proto-google-common-protos") - testImplementation("io.grpc:grpc-testing") - testRuntimeOnly("io.grpc:grpc-netty-shaded") jmhImplementation(project(":sdk:testing")) jmhImplementation(project(":sdk-extensions:resources")) jmhImplementation("com.fasterxml.jackson.core:jackson-core") jmhImplementation("io.opentelemetry.proto:opentelemetry-proto") - jmhRuntimeOnly("io.grpc:grpc-netty") + jmhImplementation("io.grpc:grpc-netty") } wire { diff --git a/sdk-extensions/autoconfigure/build.gradle.kts b/sdk-extensions/autoconfigure/build.gradle.kts index cd17789dcb8..bbeaeec897b 100644 --- a/sdk-extensions/autoconfigure/build.gradle.kts +++ b/sdk-extensions/autoconfigure/build.gradle.kts @@ -13,6 +13,7 @@ dependencies { api(project(":sdk-extensions:autoconfigure-spi")) implementation(project(":semconv")) + implementation(project(":exporters:common")) compileOnly(project(":exporters:jaeger")) compileOnly(project(":exporters:logging")) diff --git a/sdk-extensions/jaeger-remote-sampler/build.gradle.kts b/sdk-extensions/jaeger-remote-sampler/build.gradle.kts index 270de3c1463..95dc79af35d 100644 --- a/sdk-extensions/jaeger-remote-sampler/build.gradle.kts +++ b/sdk-extensions/jaeger-remote-sampler/build.gradle.kts @@ -15,10 +15,7 @@ dependencies { compileOnly(project(":sdk-extensions:autoconfigure")) implementation(project(":sdk:all")) - - // TODO(anuraaga): otlp-common has a lot of code not specific to OTLP now. As it's just internal - // code, this mysterious dependency is possibly still OK but we may need a rename or splitting. - implementation(project(":exporters:otlp:common")) + implementation(project(":exporters:common")) implementation("com.squareup.okhttp3:okhttp") @@ -39,13 +36,14 @@ testing { val testGrpcNetty by registering(JvmTestSuite::class) { dependencies { implementation(project(":sdk:testing")) + implementation(project(":exporters:common")) + implementation("com.google.protobuf:protobuf-java-util") implementation("com.linecorp.armeria:armeria-junit5") implementation("com.linecorp.armeria:armeria-grpc-protocol") implementation("org.testcontainers:junit-jupiter") implementation("io.grpc:grpc-netty") implementation("io.grpc:grpc-stub") - implementation(project(":exporters:otlp:common")) } } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 882efba0a6c..85993d27ce6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -33,6 +33,7 @@ include(":extensions:aws") include(":extensions:kotlin") include(":extensions:noop-api") include(":extensions:trace-propagators") +include(":exporters:common") include(":exporters:jaeger") include(":exporters:jaeger-proto") include(":exporters:jaeger-thrift")