public final class CurrentSpanUtils extends Object
Span in the Context.| Modifier and Type | Method and Description |
|---|---|
static <C> Callable<C> |
withSpan(io.opentelemetry.trace.Span span,
boolean endSpan,
Callable<C> callable)
|
static Runnable |
withSpan(io.opentelemetry.trace.Span span,
boolean endSpan,
Runnable runnable)
|
public static Runnable withSpan(io.opentelemetry.trace.Span span, boolean endSpan, Runnable runnable)
span - the Span to be set as current.endSpan - if true the returned Runnable will close the Span.runnable - the Runnable to run in the Span.Runnable.public static <C> Callable<C> withSpan(io.opentelemetry.trace.Span span, boolean endSpan, Callable<C> callable)
C - the Callable result type.span - the Span to be set as current.endSpan - if true the returned Runnable will close the Span.callable - the Callable to run in the Span.Callable.