Class ServerSpan
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.tracer.ServerSpan
-
public final class ServerSpan extends Object
This class encapsulates the context key for storing the currentSpanKind.SERVERspan in theContext.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanexists(io.opentelemetry.context.Context context)Returns true when aSpanKind.SERVERspan is present in the passedcontext.static @Nullable io.opentelemetry.api.trace.SpanfromContextOrNull(io.opentelemetry.context.Context context)Returns span of typeSpanKind.SERVERfrom the given context ornullif not found.static io.opentelemetry.context.Contextwith(io.opentelemetry.context.Context context, io.opentelemetry.api.trace.Span serverSpan)
-
-
-
Method Detail
-
exists
public static boolean exists(io.opentelemetry.context.Context context)
Returns true when aSpanKind.SERVERspan is present in the passedcontext.
-
fromContextOrNull
public static @Nullable io.opentelemetry.api.trace.Span fromContextOrNull(io.opentelemetry.context.Context context)
Returns span of typeSpanKind.SERVERfrom the given context ornullif not found.
-
with
public static io.opentelemetry.context.Context with(io.opentelemetry.context.Context context, io.opentelemetry.api.trace.Span serverSpan)
-
-