Skip to content

Commit adbd966

Browse files
authored
Fix some instrumentation scope names (#7632)
1 parent bb092bf commit adbd966

File tree

22 files changed

+96
-48
lines changed

22 files changed

+96
-48
lines changed

instrumentation/azure-core/azure-core-1.14/javaagent/src/test/java/AzureSdkTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void testSpan() {
4646
Context context = TracerProxy.start("hello", Context.NONE);
4747
TracerProxy.end(200, null, context);
4848

49-
testing.waitAndAssertTraces(
49+
testing.waitAndAssertTracesWithoutScopeVersionVerification(
5050
trace ->
5151
trace.hasSpansSatisfyingExactly(
5252
span ->

instrumentation/azure-core/azure-core-1.19/javaagent/src/test/java/AzureSdkTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void testSpan() {
4646
Context context = TracerProxy.start("hello", Context.NONE);
4747
TracerProxy.end(200, null, context);
4848

49-
testing.waitAndAssertTraces(
49+
testing.waitAndAssertTracesWithoutScopeVersionVerification(
5050
trace ->
5151
trace.hasSpansSatisfyingExactly(
5252
span ->

instrumentation/couchbase/couchbase-3.1.6/javaagent/src/test/groovy/CouchbaseClient316Test.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class CouchbaseClient316Test extends AgentInstrumentationSpecification {
5757
}
5858

5959
then:
60-
assertTraces(1) {
60+
assertTracesWithoutScopeVersionVerification(1) {
6161
trace(0, 2) {
6262
span(0) {
6363
name(~/.*get/)

instrumentation/couchbase/couchbase-3.1/javaagent/src/test/groovy/CouchbaseClient31Test.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class CouchbaseClient31Test extends AgentInstrumentationSpecification {
6666
}
6767

6868
then:
69-
assertTraces(1) {
69+
assertTracesWithoutScopeVersionVerification(1) {
7070
trace(0, 2) {
7171
span(0) {
7272
name(~/.*get/)

instrumentation/couchbase/couchbase-3.2/javaagent/src/test/groovy/CouchbaseClient32Test.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class CouchbaseClient32Test extends AgentInstrumentationSpecification {
5959
}
6060

6161
then:
62-
assertTraces(1) {
62+
assertTracesWithoutScopeVersionVerification(1) {
6363
trace(0, 2) {
6464
span(0) {
6565
name(~/.*get/)

instrumentation/hibernate/hibernate-procedure-call-4.3/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/v4_3/Hibernate43Singletons.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
public final class Hibernate43Singletons {
1313

1414
private static final Instrumenter<HibernateOperation, Void> INSTANCE =
15-
HibernateInstrumenterFactory.createInstrumenter("io.opentelemetry.hibernate-4.3");
15+
HibernateInstrumenterFactory.createInstrumenter(
16+
"io.opentelemetry.hibernate-procedure-call-4.3");
1617

1718
public static Instrumenter<HibernateOperation, Void> instrumenter() {
1819
return INSTANCE;

instrumentation/jaxrs/jaxrs-2.0/jaxrs-2.0-cxf-3.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrs/v2_0/CxfSingletons.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public final class CxfSingletons {
1313

1414
private static final Instrumenter<HandlerData, Void> INSTANCE =
15-
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.cxf-jaxrs-3.2");
15+
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.jaxrs-2.0-cxf-3.2");
1616

1717
public static Instrumenter<HandlerData, Void> instrumenter() {
1818
return INSTANCE;

instrumentation/jaxrs/jaxrs-2.0/jaxrs-2.0-jersey-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrs/v2_0/JerseySingletons.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public final class JerseySingletons {
1313

1414
private static final Instrumenter<HandlerData, Void> INSTANCE =
15-
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.jersey-2.0");
15+
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.jaxrs-2.0-jersey-2.0");
1616

1717
public static Instrumenter<HandlerData, Void> instrumenter() {
1818
return INSTANCE;

instrumentation/jaxrs/jaxrs-2.0/jaxrs-2.0-resteasy-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrs/v2_0/Resteasy30Singletons.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public final class Resteasy30Singletons {
1313

1414
private static final Instrumenter<HandlerData, Void> INSTANCE =
15-
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.resteasy-3.0");
15+
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.jaxrs-2.0-resteasy-3.0");
1616

1717
public static Instrumenter<HandlerData, Void> instrumenter() {
1818
return INSTANCE;

instrumentation/jaxrs/jaxrs-2.0/jaxrs-2.0-resteasy-3.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrs/v2_0/Resteasy31Singletons.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public final class Resteasy31Singletons {
1313

1414
private static final Instrumenter<HandlerData, Void> INSTANCE =
15-
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.resteasy-3.1");
15+
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.jaxrs-2.0-resteasy-3.1");
1616

1717
public static Instrumenter<HandlerData, Void> instrumenter() {
1818
return INSTANCE;

instrumentation/jaxrs/jaxrs-3.0/jaxrs-3.0-annotations/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrs/v3_0/JaxrsAnnotationsSingletons.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public final class JaxrsAnnotationsSingletons {
1313

1414
private static final Instrumenter<HandlerData, Void> INSTANCE =
15-
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.jaxrs-annotations-3.0");
15+
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.jaxrs-3.0-annotations");
1616

1717
public static Instrumenter<HandlerData, Void> instrumenter() {
1818
return INSTANCE;

instrumentation/jaxrs/jaxrs-3.0/jaxrs-3.0-jersey-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrs/v3_0/JerseySingletons.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public final class JerseySingletons {
1313

1414
private static final Instrumenter<HandlerData, Void> INSTANCE =
15-
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.jersey-2.0");
15+
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.jaxrs-3.0-jersey-3.0");
1616

1717
public static Instrumenter<HandlerData, Void> instrumenter() {
1818
return INSTANCE;

instrumentation/jaxrs/jaxrs-3.0/jaxrs-3.0-resteasy-6.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrs/v3_0/ResteasySingletons.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public final class ResteasySingletons {
1313

1414
private static final Instrumenter<HandlerData, Void> INSTANCE =
15-
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.resteasy-6.0");
15+
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.jaxrs-3.0-resteasy-6.0");
1616

1717
public static Instrumenter<HandlerData, Void> instrumenter() {
1818
return INSTANCE;

instrumentation/jaxws/jaxws-jws-api-1.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxws/jws/v1_1/JwsSingletons.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public final class JwsSingletons {
1313

1414
private static final Instrumenter<JaxWsRequest, Void> INSTANCE =
15-
JaxWsInstrumenterFactory.createInstrumenter("io.opentelemetry.jws-1.1");
15+
JaxWsInstrumenterFactory.createInstrumenter("io.opentelemetry.jaxws-jws-api-1.1");
1616

1717
public static Instrumenter<JaxWsRequest, Void> instrumenter() {
1818
return INSTANCE;

instrumentation/logback/logback-appender-1.0/javaagent/src/test/java/io/opentelemetry/instrumentation/logback/appender/v1_0/LogbackTest.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@ private static void test(
139139
LogRecordData log = testing.logRecords().get(0);
140140
assertThat(log)
141141
.hasBody("xyz: 123")
142-
// TODO (trask) why is version "" instead of null?
143-
.hasInstrumentationScope(
144-
InstrumentationScopeInfo.builder(expectedLoggerName).setVersion("").build())
142+
.hasInstrumentationScope(InstrumentationScopeInfo.builder(expectedLoggerName).build())
145143
.hasSeverity(expectedSeverity)
146144
.hasSeverityText(expectedSeverityText);
147145
if (logException) {
@@ -201,8 +199,7 @@ void testMdc() {
201199
LogRecordData log = getLogRecords().get(0);
202200
assertThat(log)
203201
.hasBody("xyz: 123")
204-
// TODO (trask) why is version "" instead of null?
205-
.hasInstrumentationScope(InstrumentationScopeInfo.builder("abc").setVersion("").build())
202+
.hasInstrumentationScope(InstrumentationScopeInfo.builder("abc").build())
206203
.hasSeverity(Severity.INFO)
207204
.hasSeverityText("INFO")
208205
// TODO (trask) convert to hasAttributesSatisfyingExactly once that's available for logs

instrumentation/vertx/vertx-kafka-client-3.6/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/kafka/v3_6/VertxKafkaSingletons.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
public final class VertxKafkaSingletons {
1717

18-
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.vertx-kafka-client-3.5";
18+
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.vertx-kafka-client-3.6";
1919

2020
private static final Instrumenter<ConsumerRecords<?, ?>, Void> BATCH_PROCESS_INSTRUMENTER;
2121
private static final Instrumenter<ConsumerRecord<?, ?>, Void> PROCESS_INSTRUMENTER;

testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/InstrumentationSpecification.groovy

+13-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ abstract class InstrumentationSpecification extends Specification {
9494
* 20 seconds, then times out.
9595
*/
9696
List<List<SpanData>> waitForTraces(int numberOfTraces) {
97-
TelemetryDataUtil.waitForTraces({ testRunner().getExportedSpans() }, numberOfTraces)
97+
TelemetryDataUtil.waitForTraces({ testRunner().getExportedSpans() }, numberOfTraces, true)
9898
}
9999

100100
void ignoreTracesAndClear(int numberOfTraces) {
@@ -109,9 +109,20 @@ abstract class InstrumentationSpecification extends Specification {
109109
options = "io.opentelemetry.instrumentation.test.asserts.ListWriterAssert")
110110
@DelegatesTo(value = InMemoryExporterAssert, strategy = Closure.DELEGATE_FIRST)
111111
final Closure spec) {
112-
InMemoryExporterAssert.assertTraces({ testRunner().getExportedSpans() }, size, spec)
112+
InMemoryExporterAssert.assertTraces({ testRunner().getExportedSpans() }, size, spec, true)
113113
}
114114

115+
void assertTracesWithoutScopeVersionVerification(
116+
final int size,
117+
@ClosureParams(
118+
value = SimpleType,
119+
options = "io.opentelemetry.instrumentation.test.asserts.ListWriterAssert")
120+
@DelegatesTo(value = InMemoryExporterAssert, strategy = Closure.DELEGATE_FIRST)
121+
final Closure spec) {
122+
InMemoryExporterAssert.assertTraces({ testRunner().getExportedSpans() }, size, spec, false)
123+
}
124+
125+
115126
/**
116127
* Runs the provided {@code callback} inside the scope of an INTERNAL span with name {@code
117128
* spanName}.

testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/asserts/InMemoryExporterAssert.groovy

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ class InMemoryExporterAssert {
3232

3333
static void assertTraces(Supplier<List<SpanData>> spanSupplier, int expectedSize,
3434
@ClosureParams(value = SimpleType, options = ['io.opentelemetry.instrumentation.test.asserts.ListWriterAssert'])
35-
@DelegatesTo(value = InMemoryExporterAssert, strategy = Closure.DELEGATE_FIRST) Closure spec) {
35+
@DelegatesTo(value = InMemoryExporterAssert, strategy = Closure.DELEGATE_FIRST) Closure spec,
36+
boolean verifyScopeVersion) {
3637
try {
37-
def traces = TelemetryDataUtil.waitForTraces(spanSupplier, expectedSize)
38+
def traces = TelemetryDataUtil.waitForTraces(spanSupplier, expectedSize, verifyScopeVersion)
3839
assert traces.size() == expectedSize
3940
def asserter = new InMemoryExporterAssert(traces, spanSupplier)
4041
def clone = (Closure) spec.clone()

testing-common/src/main/java/io/opentelemetry/instrumentation/testing/InstrumentationTestRunner.java

+26-9
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ public final List<List<SpanData>> traces() {
6262
return TelemetryDataUtil.groupTraces(getExportedSpans());
6363
}
6464

65-
public final List<List<SpanData>> waitForTraces(int numberOfTraces) {
65+
public final List<List<SpanData>> waitForTraces(int numberOfTraces, boolean verifyScopeVersion) {
6666
try {
6767
return TelemetryDataUtil.waitForTraces(
68-
this::getExportedSpans, numberOfTraces, 20, TimeUnit.SECONDS);
68+
this::getExportedSpans, numberOfTraces, 20, TimeUnit.SECONDS, verifyScopeVersion);
6969
} catch (TimeoutException | InterruptedException e) {
7070
throw new AssertionError("Error waiting for " + numberOfTraces + " traces", e);
7171
}
@@ -75,7 +75,19 @@ public final List<List<SpanData>> waitForTraces(int numberOfTraces) {
7575
@SuppressWarnings("varargs")
7676
public final void waitAndAssertSortedTraces(
7777
Comparator<List<SpanData>> traceComparator, Consumer<TraceAssert>... assertions) {
78-
waitAndAssertTraces(traceComparator, Arrays.asList(assertions));
78+
waitAndAssertTraces(traceComparator, Arrays.asList(assertions), true);
79+
}
80+
81+
@SafeVarargs
82+
@SuppressWarnings("varargs")
83+
public final void waitAndAssertTracesWithoutScopeVersionVerification(
84+
Consumer<TraceAssert>... assertions) {
85+
waitAndAssertTracesWithoutScopeVersionVerification(Arrays.asList(assertions));
86+
}
87+
88+
public final <T extends Consumer<TraceAssert>>
89+
void waitAndAssertTracesWithoutScopeVersionVerification(Iterable<T> assertions) {
90+
waitAndAssertTraces(null, assertions, false);
7991
}
8092

8193
@SafeVarargs
@@ -85,28 +97,33 @@ public final void waitAndAssertTraces(Consumer<TraceAssert>... assertions) {
8597
}
8698

8799
public final <T extends Consumer<TraceAssert>> void waitAndAssertTraces(Iterable<T> assertions) {
88-
waitAndAssertTraces(null, assertions);
100+
waitAndAssertTraces(null, assertions, true);
89101
}
90102

91103
private <T extends Consumer<TraceAssert>> void waitAndAssertTraces(
92-
@Nullable Comparator<List<SpanData>> traceComparator, Iterable<T> assertions) {
104+
@Nullable Comparator<List<SpanData>> traceComparator,
105+
Iterable<T> assertions,
106+
boolean verifyScopeVersion) {
93107
List<T> assertionsList = new ArrayList<>();
94108
assertions.forEach(assertionsList::add);
95109

96110
try {
97-
await().untilAsserted(() -> doAssertTraces(traceComparator, assertionsList));
111+
await()
112+
.untilAsserted(() -> doAssertTraces(traceComparator, assertionsList, verifyScopeVersion));
98113
} catch (ConditionTimeoutException e) {
99114
// Don't throw this failure since the stack is the awaitility thread, causing confusion.
100115
// Instead, just assert one more time on the test thread, which will fail with a better stack
101116
// trace.
102117
// TODO(anuraaga): There is probably a better way to do this.
103-
doAssertTraces(traceComparator, assertionsList);
118+
doAssertTraces(traceComparator, assertionsList, verifyScopeVersion);
104119
}
105120
}
106121

107122
private <T extends Consumer<TraceAssert>> void doAssertTraces(
108-
@Nullable Comparator<List<SpanData>> traceComparator, List<T> assertionsList) {
109-
List<List<SpanData>> traces = waitForTraces(assertionsList.size());
123+
@Nullable Comparator<List<SpanData>> traceComparator,
124+
List<T> assertionsList,
125+
boolean verifyScopeVersion) {
126+
List<List<SpanData>> traces = waitForTraces(assertionsList.size(), verifyScopeVersion);
110127
if (traceComparator != null) {
111128
traces.sort(traceComparator);
112129
}

testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/InstrumentationExtension.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void clearData() {
113113
* 20 seconds, then times out.
114114
*/
115115
public List<List<SpanData>> waitForTraces(int numberOfTraces) {
116-
return testRunner.waitForTraces(numberOfTraces);
116+
return testRunner.waitForTraces(numberOfTraces, true);
117117
}
118118

119119
@SafeVarargs
@@ -123,6 +123,13 @@ public final void waitAndAssertSortedTraces(
123123
testRunner.waitAndAssertSortedTraces(traceComparator, assertions);
124124
}
125125

126+
@SafeVarargs
127+
@SuppressWarnings("varargs")
128+
public final void waitAndAssertTracesWithoutScopeVersionVerification(
129+
Consumer<TraceAssert>... assertions) {
130+
testRunner.waitAndAssertTracesWithoutScopeVersionVerification(assertions);
131+
}
132+
126133
@SafeVarargs
127134
@SuppressWarnings("varargs")
128135
public final void waitAndAssertTraces(Consumer<TraceAssert>... assertions) {

testing-common/src/main/java/io/opentelemetry/instrumentation/testing/util/TelemetryDataUtil.java

+18-11
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,18 @@ public static List<List<SpanData>> groupTraces(List<SpanData> spans) {
4646
return traces;
4747
}
4848

49-
public static List<List<SpanData>> waitForTraces(Supplier<List<SpanData>> supplier, int number)
49+
public static List<List<SpanData>> waitForTraces(
50+
Supplier<List<SpanData>> supplier, int number, boolean verifyScopeVersion)
5051
throws InterruptedException, TimeoutException {
51-
return waitForTraces(supplier, number, 20, TimeUnit.SECONDS);
52+
return waitForTraces(supplier, number, 20, TimeUnit.SECONDS, verifyScopeVersion);
5253
}
5354

5455
public static List<List<SpanData>> waitForTraces(
55-
Supplier<List<SpanData>> supplier, int number, long timeout, TimeUnit unit)
56+
Supplier<List<SpanData>> supplier,
57+
int number,
58+
long timeout,
59+
TimeUnit unit,
60+
boolean verifyScopeVersion)
5661
throws InterruptedException, TimeoutException {
5762
long startTime = System.nanoTime();
5863
List<List<SpanData>> allTraces = groupTraces(supplier.get());
@@ -74,14 +79,16 @@ public static List<List<SpanData>> waitForTraces(
7479
+ " total trace(s): "
7580
+ allTraces);
7681
}
77-
// TODO (trask) is there a better location for this assertion?
78-
for (List<SpanData> trace : completeTraces) {
79-
for (SpanData span : trace) {
80-
if (!span.getInstrumentationScopeInfo().getName().equals("test")) {
81-
assertThat(span.getInstrumentationScopeInfo().getVersion())
82-
.as(
83-
"Instrumentation version was empty; make sure that the instrumentation name matches the gradle module name")
84-
.isNotNull();
82+
if (verifyScopeVersion) {
83+
// TODO (trask) is there a better location for this assertion?
84+
for (List<SpanData> trace : completeTraces) {
85+
for (SpanData span : trace) {
86+
if (!span.getInstrumentationScopeInfo().getName().equals("test")) {
87+
assertThat(span.getInstrumentationScopeInfo().getVersion())
88+
.as(
89+
"Instrumentation version was empty; make sure that the instrumentation name matches the gradle module name")
90+
.isNotNull();
91+
}
8592
}
8693
}
8794
}

testing-common/src/main/java/io/opentelemetry/javaagent/testing/common/AgentTestingExporterAccess.java

+10-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package io.opentelemetry.javaagent.testing.common;
77

8+
import static com.google.common.base.Strings.emptyToNull;
89
import static io.opentelemetry.api.common.AttributeKey.booleanArrayKey;
910
import static io.opentelemetry.api.common.AttributeKey.doubleArrayKey;
1011
import static io.opentelemetry.api.common.AttributeKey.longArrayKey;
@@ -189,7 +190,9 @@ public static List<SpanData> getExportedSpans() {
189190
fromProto(resource.getAttributesList())))
190191
.setInstrumentationScopeInfo(
191192
InstrumentationScopeInfo.builder(instrumentationScope.getName())
192-
.setVersion(instrumentationScope.getVersion())
193+
// emptyToNull since they are the same at protobuf layer,
194+
// and allows for simpler verification of InstrumentationScope
195+
.setVersion(emptyToNull(instrumentationScope.getVersion()))
193196
.build())
194197
.setName(span.getName())
195198
.setStartEpochNanos(span.getStartTimeUnixNano())
@@ -267,7 +270,9 @@ public static List<MetricData> getExportedMetrics() {
267270
io.opentelemetry.sdk.resources.Resource.create(
268271
fromProto(resource.getAttributesList())),
269272
InstrumentationScopeInfo.builder(instrumentationScope.getName())
270-
.setVersion(instrumentationScope.getVersion())
273+
// emptyToNull since they are the same at protobuf layer,
274+
// and allows for simpler verification of InstrumentationScope
275+
.setVersion(emptyToNull(instrumentationScope.getVersion()))
271276
.build()));
272277
}
273278
}
@@ -308,7 +313,9 @@ public static List<LogRecordData> getExportedLogRecords() {
308313
io.opentelemetry.sdk.resources.Resource.create(
309314
fromProto(resource.getAttributesList())),
310315
InstrumentationScopeInfo.builder(instrumentationScope.getName())
311-
.setVersion(instrumentationScope.getVersion())
316+
// emptyToNull since they are the same at protobuf layer,
317+
// and allows for simpler verification of InstrumentationScope
318+
.setVersion(emptyToNull(instrumentationScope.getVersion()))
312319
.build()));
313320
}
314321
}

0 commit comments

Comments
 (0)