Skip to content

Commit 9560996

Browse files
committed
Use explicit String.concat in OTelDurationConverter
This is done because OTelDurationConverter is used at startup and the use of "+" forces the use of StringConcatFactory which is rather heavy and not beneficial in this simple case
1 parent ea4fb8a commit 9560996

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/OpenTelemetryRecorder.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ public String convert(final String value) throws IllegalArgumentException, NullP
162162
}
163163

164164
try {
165-
return duration.toMillis() + "ms";
165+
return String.valueOf(duration.toMillis()).concat("ms");
166166
} catch (Exception ignored) {
167-
return duration.toSeconds() + "s";
167+
return String.valueOf(duration.toSeconds()).concat("s");
168168
}
169169
}
170170
}

0 commit comments

Comments
 (0)