Remove "semver" prefix from instrumentation library version (#2180)

This commit is contained in:
Armin Ruech 2020-12-02 19:29:11 +01:00 committed by GitHub
parent ba9f9c09a2
commit 5585e73611
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 11 deletions

View File

@ -43,7 +43,7 @@ monitored. More information is available in the specification chapter [Obtaining
```java
Tracer tracer =
OpenTelemetry.getGlobalTracer("instrumentation-library-name","semver:1.0.0");
OpenTelemetry.getGlobalTracer("instrumentation-library-name", "1.0.0");
```
### Create basic Span
@ -262,7 +262,7 @@ The following is an example of counter usage:
```java
// Gets or creates a named meter instance
Meter meter = OpenTelemetry.getGlobalMeter("instrumentation-library-name","semver:1.0.0");
Meter meter = OpenTelemetry.getGlobalMeter("instrumentation-library-name", "1.0.0");
// Build counter e.g. LongCounter
LongCounter counter = meter

View File

@ -85,8 +85,7 @@ public interface OpenTelemetry {
*
* @param instrumentationName The name of the instrumentation library, not the name of the
* instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.
* @param instrumentationVersion The version of the instrumentation library (e.g.,
* "semver:1.0.0").
* @param instrumentationVersion The version of the instrumentation library (e.g., "1.0.0").
* @return a tracer instance.
*/
static Tracer getGlobalTracer(String instrumentationName, String instrumentationVersion) {

View File

@ -41,8 +41,7 @@ public interface TracerProvider {
*
* @param instrumentationName The name of the instrumentation library, not the name of the
* instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.
* @param instrumentationVersion The version of the instrumentation library (e.g.,
* "semver:1.0.0").
* @param instrumentationVersion The version of the instrumentation library (e.g., "1.0.0").
* @return a tracer instance.
*/
Tracer get(String instrumentationName, String instrumentationVersion);

View File

@ -24,7 +24,7 @@ public abstract class InstrumentationLibraryInfo {
*
* @param name name of the instrumentation library (e.g., "io.opentelemetry.contrib.mongodb"),
* must not be null
* @param version version of the instrumentation library (e.g., "semver:1.0.0"), might be null
* @param version version of the instrumentation library (e.g., "1.0.0"), might be null
* @return the new instance
*/
public static InstrumentationLibraryInfo create(String name, @Nullable String version) {

View File

@ -22,8 +22,6 @@ class InstrumentationLibraryInfoTest {
@Test
void nullName() {
assertThrows(
NullPointerException.class,
() -> InstrumentationLibraryInfo.create(null, "semver:1.0.0"),
"name");
NullPointerException.class, () -> InstrumentationLibraryInfo.create(null, "1.0.0"), "name");
}
}

View File

@ -33,7 +33,7 @@ class TracerSdkTest {
private static final String SPAN_NAME = "span_name";
private static final String INSTRUMENTATION_LIBRARY_NAME =
"io.opentelemetry.sdk.trace.TracerSdkTest";
private static final String INSTRUMENTATION_LIBRARY_VERSION = "semver:0.2.0";
private static final String INSTRUMENTATION_LIBRARY_VERSION = "0.2.0";
private static final InstrumentationLibraryInfo instrumentationLibraryInfo =
InstrumentationLibraryInfo.create(
INSTRUMENTATION_LIBRARY_NAME, INSTRUMENTATION_LIBRARY_VERSION);