Skip to content

Commit 80f5998

Browse files
committed
alwayse set schema url
1 parent 5e1dc2b commit 80f5998

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/Otel2PrometheusConverter.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,7 @@ private Labels convertAttributes(
487487
labelNameToValue.putIfAbsent(OTEL_SCOPE_VERSION, scope.getVersion());
488488
}
489489
String schemaUrl = scope.getSchemaUrl();
490-
if (schemaUrl != null) {
491-
labelNameToValue.putIfAbsent(OTEL_SCOPE_SCHEMA_URL, schemaUrl);
492-
}
490+
labelNameToValue.putIfAbsent(OTEL_SCOPE_SCHEMA_URL, schemaUrl == null ? "" : schemaUrl);
493491
scope
494492
.getAttributes()
495493
.forEach(

0 commit comments

Comments
 (0)