Split API packages, move context in the same directory (#2199)

There are some things left to be done:
* Decide if context package should also be opentelemetry-api-context.
* Cleanup internal packages, things that are used by only one artifact should be moved there.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
This commit is contained in:
Bogdan Drutu 2020-12-05 11:33:20 -05:00 committed by GitHub
parent a3615b9d91
commit 26124ad075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
191 changed files with 278 additions and 119 deletions

View File

@ -2,7 +2,7 @@
[![Javadocs][javadoc-image]][javadoc-url]
* The abstract classes in this directory can be subclassed to create alternative
* The interfaces in this directory can be implemented to create alternative
implementations of the OpenTelemetry library.
[javadoc-image]: https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api.svg

26
api/all/build.gradle Normal file
View File

@ -0,0 +1,26 @@
plugins {
id "java"
id "maven-publish"
id "me.champeau.gradle.jmh"
id "ru.vyarus.animalsniffer"
}
description = 'OpenTelemetry API'
ext.moduleName = "io.opentelemetry.api"
dependencies {
api project(':opentelemetry-context'),
project(':opentelemetry-api-baggage'),
project(':opentelemetry-api-common'),
project(':opentelemetry-api-internal'),
project(':opentelemetry-api-metrics'),
project(':opentelemetry-api-trace')
annotationProcessor libraries.auto_value
signature libraries.android_signature
testImplementation libraries.jqf,
libraries.guava_testlib
}

View File

@ -242,7 +242,7 @@ class OpenTelemetryTest {
}
private static File createService(Class<?> service, Class<?>... impls) throws IOException {
URL location = Tracer.class.getProtectionDomain().getCodeSource().getLocation();
URL location = OpenTelemetryTest.class.getProtectionDomain().getCodeSource().getLocation();
File file = new File(location.getPath() + "META-INF/services/" + service.getName());
file.getParentFile().mkdirs();

6
api/baggage/README.md Normal file
View File

@ -0,0 +1,6 @@
# OpenTelemetry Baggage API
[![Javadocs][javadoc-image]][javadoc-url]
[javadoc-image]: https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api-baggage.svg
[javadoc-url]: https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api-baggage

22
api/baggage/build.gradle Normal file
View File

@ -0,0 +1,22 @@
plugins {
id "java"
id "maven-publish"
id "me.champeau.gradle.jmh"
id "ru.vyarus.animalsniffer"
}
description = 'OpenTelemetry API'
ext.moduleName = "io.opentelemetry.api"
dependencies {
api project(':opentelemetry-context'),
project(':opentelemetry-api-internal')
annotationProcessor libraries.auto_value
signature libraries.android_signature
testImplementation libraries.jqf,
libraries.guava_testlib
}

6
api/common/README.md Normal file
View File

@ -0,0 +1,6 @@
# OpenTelemetry Common API
[![Javadocs][javadoc-image]][javadoc-url]
[javadoc-image]: https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api-common.svg
[javadoc-url]: https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api-common

21
api/common/build.gradle Normal file
View File

@ -0,0 +1,21 @@
plugins {
id "java"
id "maven-publish"
id "me.champeau.gradle.jmh"
id "ru.vyarus.animalsniffer"
}
description = 'OpenTelemetry API'
ext.moduleName = "io.opentelemetry.api.common"
dependencies {
api project(':opentelemetry-api-internal')
annotationProcessor libraries.auto_value
signature libraries.android_signature
testImplementation libraries.jqf,
libraries.guava_testlib
}

6
api/internal/README.md Normal file
View File

@ -0,0 +1,6 @@
# OpenTelemetry Internal API
[![Javadocs][javadoc-image]][javadoc-url]
[javadoc-image]: https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api-internal.svg
[javadoc-url]: https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api-internal

View File

@ -7,7 +7,7 @@ plugins {
}
description = 'OpenTelemetry API'
ext.moduleName = "io.opentelemetry.api"
ext.moduleName = "io.opentelemetry.api.internal"
dependencies {
api project(':opentelemetry-context')

View File

@ -7,8 +7,6 @@ package io.opentelemetry.api.internal;
import static io.opentelemetry.api.internal.Utils.checkArgument;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.api.common.Labels;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@ -26,8 +24,6 @@ import javax.annotation.concurrent.Immutable;
* boolean)}, assuming you don't want the "empty" keys to be kept in your collection.
*
* @param <V> The type of the values contained in this.
* @see Labels
* @see Attributes
*/
@SuppressWarnings("rawtypes")
@Immutable

Some files were not shown because too many files have changed in this diff Show More