Break out :exporters:common module (#4575)

* Break out :exporters:common module

* Comment out readme links

* spot
This commit is contained in:
jack-berg 2022-08-08 08:28:24 -05:00 committed by GitHub
parent 91bd17e09b
commit 77be2e0136
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
56 changed files with 69 additions and 29 deletions

View File

@ -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` | <!--VERSION_STABLE-->1.16.0<!--/VERSION_STABLE--> |
| [Zipkin Exporter](./exporters/zipkin) | Zipkin trace exporter | `opentelemetry-exporter-zipkin` | <!--VERSION_STABLE-->1.16.0<!--/VERSION_STABLE--> |
| [Prometheus Exporter](./exporters/prometheus) | Prometheus metric exporter | `opentelemetry-exporter-prometheus` | <!--VERSION_UNSTABLE-->1.16.0-alpha<!--/VERSION_UNSTABLE--> |
| [Exporter Common](./exporters/common) | Shared exporter components (internal) | `opentelemetry-exporter-common` | TODO: add version once published in 1.17.0 |
### SDK Extensions

View File

@ -0,0 +1,2 @@
Comparing source compatibility of against
No changes.

View File

@ -0,0 +1,8 @@
# OpenTelemetry - Exporter Common
<!-- TODO: uncomment once published
[![Javadocs][javadoc-image]][javadoc-url]
[javadoc-image]: https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-common.svg
[javadoc-url]: https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-common
-->

View File

@ -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<String, String> 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")
}

View File

@ -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;

View File

@ -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"))

View File

@ -15,7 +15,7 @@ val versions: Map<String, String> 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 {

View File

@ -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"))

View File

@ -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"))
}
}
}

View File

@ -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")