Skip to content

Commit 5585e73

Browse files
authored
Remove "semver" prefix from instrumentation library version (open-telemetry#2180)
1 parent ba9f9c0 commit 5585e73

6 files changed

Lines changed: 7 additions & 11 deletions

File tree

QUICKSTART.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ monitored. More information is available in the specification chapter [Obtaining
4343

4444
```java
4545
Tracer tracer =
46-
OpenTelemetry.getGlobalTracer("instrumentation-library-name","semver:1.0.0");
46+
OpenTelemetry.getGlobalTracer("instrumentation-library-name", "1.0.0");
4747
```
4848

4949
### Create basic Span
@@ -262,7 +262,7 @@ The following is an example of counter usage:
262262

263263
```java
264264
// Gets or creates a named meter instance
265-
Meter meter = OpenTelemetry.getGlobalMeter("instrumentation-library-name","semver:1.0.0");
265+
Meter meter = OpenTelemetry.getGlobalMeter("instrumentation-library-name", "1.0.0");
266266

267267
// Build counter e.g. LongCounter
268268
LongCounter counter = meter

api/src/main/java/io/opentelemetry/api/OpenTelemetry.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ static Tracer getGlobalTracer(String instrumentationName) {
8585
*
8686
* @param instrumentationName The name of the instrumentation library, not the name of the
8787
* instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.
88-
* @param instrumentationVersion The version of the instrumentation library (e.g.,
89-
* "semver:1.0.0").
88+
* @param instrumentationVersion The version of the instrumentation library (e.g., "1.0.0").
9089
* @return a tracer instance.
9190
*/
9291
static Tracer getGlobalTracer(String instrumentationName, String instrumentationVersion) {

api/src/main/java/io/opentelemetry/api/trace/TracerProvider.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ static TracerProvider getDefault() {
4141
*
4242
* @param instrumentationName The name of the instrumentation library, not the name of the
4343
* instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.
44-
* @param instrumentationVersion The version of the instrumentation library (e.g.,
45-
* "semver:1.0.0").
44+
* @param instrumentationVersion The version of the instrumentation library (e.g., "1.0.0").
4645
* @return a tracer instance.
4746
*/
4847
Tracer get(String instrumentationName, String instrumentationVersion);

sdk/common/src/main/java/io/opentelemetry/sdk/common/InstrumentationLibraryInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public abstract class InstrumentationLibraryInfo {
2424
*
2525
* @param name name of the instrumentation library (e.g., "io.opentelemetry.contrib.mongodb"),
2626
* must not be null
27-
* @param version version of the instrumentation library (e.g., "semver:1.0.0"), might be null
27+
* @param version version of the instrumentation library (e.g., "1.0.0"), might be null
2828
* @return the new instance
2929
*/
3030
public static InstrumentationLibraryInfo create(String name, @Nullable String version) {

sdk/common/src/test/java/io/opentelemetry/sdk/common/InstrumentationLibraryInfoTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ void emptyLibraryInfo() {
2222
@Test
2323
void nullName() {
2424
assertThrows(
25-
NullPointerException.class,
26-
() -> InstrumentationLibraryInfo.create(null, "semver:1.0.0"),
27-
"name");
25+
NullPointerException.class, () -> InstrumentationLibraryInfo.create(null, "1.0.0"), "name");
2826
}
2927
}

sdk/trace/src/test/java/io/opentelemetry/sdk/trace/TracerSdkTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class TracerSdkTest {
3333
private static final String SPAN_NAME = "span_name";
3434
private static final String INSTRUMENTATION_LIBRARY_NAME =
3535
"io.opentelemetry.sdk.trace.TracerSdkTest";
36-
private static final String INSTRUMENTATION_LIBRARY_VERSION = "semver:0.2.0";
36+
private static final String INSTRUMENTATION_LIBRARY_VERSION = "0.2.0";
3737
private static final InstrumentationLibraryInfo instrumentationLibraryInfo =
3838
InstrumentationLibraryInfo.create(
3939
INSTRUMENTATION_LIBRARY_NAME, INSTRUMENTATION_LIBRARY_VERSION);

0 commit comments

Comments
 (0)