Remove "semver" prefix from instrumentation library version (#2180)
This commit is contained in:
parent
ba9f9c09a2
commit
5585e73611
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue