Skip to content

Commit d8a5ef8

Browse files
committed
Fix TelemetryConverter to preserve schema URL from spans
The test framework was not copying the schema URL from the protobuf ScopeSpans to the InstrumentationScopeInfo when converting spans, causing all schema URL assertions to fail even though spans were correctly emitting schema URLs.
1 parent 264210e commit d8a5ef8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

testing-common/src/main/java/io/opentelemetry/instrumentation/testing/internal/TelemetryConverter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public static List<SpanData> getSpanData(Collection<ResourceSpans> allResourceSp
126126
// emptyToNull since they are the same at protobuf layer,
127127
// and allows for simpler verification of InstrumentationScope
128128
.setVersion(emptyToNull(instrumentationScope.getVersion()))
129+
.setSchemaUrl(emptyToNull(ilSpans.getSchemaUrl()))
129130
.build())
130131
.setName(span.getName())
131132
.setStartEpochNanos(span.getStartTimeUnixNano())

0 commit comments

Comments
 (0)