From dd93dbea0f2b5628470027a047bf1b9c0da988b2 Mon Sep 17 00:00:00 2001 From: Paul Carter-Brown Date: Tue, 4 Aug 2020 15:39:10 +0200 Subject: [PATCH] Don't use string format for hex conversion due to high overhead --- .../src/main/java/io/quarkus/jaeger/runtime/MDCScope.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/jaeger/runtime/src/main/java/io/quarkus/jaeger/runtime/MDCScope.java b/extensions/jaeger/runtime/src/main/java/io/quarkus/jaeger/runtime/MDCScope.java index 8e8ae138f46e7..34471463a96ce 100644 --- a/extensions/jaeger/runtime/src/main/java/io/quarkus/jaeger/runtime/MDCScope.java +++ b/extensions/jaeger/runtime/src/main/java/io/quarkus/jaeger/runtime/MDCScope.java @@ -58,7 +58,7 @@ public Span span() { protected void putContext(JaegerSpanContext spanContext) { MDC.put(TRACE_ID, spanContext.getTraceId()); - MDC.put(SPAN_ID, String.format("%16x", spanContext.getSpanId())); + MDC.put(SPAN_ID, Long.toHexString(spanContext.getSpanId())); MDC.put(SAMPLED, Boolean.toString(spanContext.isSampled())); } }