Span () { long jitTime = JvmRuntimeUtils.INSTANCE.getJitTime(); long gcTime = JvmRuntimeUtils.INSTANCE.getGCTime(); return new SpanWithOnEndListener(spanBuilder.startSpan(), span -> { span.setAttribute("jitTime", JvmRuntimeUtils.INSTANCE.getJitTime() - jitTime); span.setAttribute("gcTime", JvmRuntimeUtils.INSTANCE.getGCTime() - gcTime); }); }