Class ServerSpan
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.server.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 Deprecated Methods Modifier and Type Method Description static booleanexists(io.opentelemetry.context.Context context)Deprecated.This method should not be used directly; it's functionality is encapsulated inside the Instrumenter API.static 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)Deprecated.This method should not be used directly; it's functionality is encapsulated inside the Instrumenter API.
-
-
-
Method Detail
-
exists
@Deprecated public static boolean exists(io.opentelemetry.context.Context context)
Deprecated.This method should not be used directly; it's functionality is encapsulated inside the Instrumenter API.Returns true when aSpanKind.SERVERspan is present in the passedcontext.
-
fromContextOrNull
@Nullable public static io.opentelemetry.api.trace.Span fromContextOrNull(io.opentelemetry.context.Context context)
Returns span of typeSpanKind.SERVERfrom the given context ornullif not found.
-
with
@Deprecated public static io.opentelemetry.context.Context with(io.opentelemetry.context.Context context, io.opentelemetry.api.trace.Span serverSpan)
Deprecated.This method should not be used directly; it's functionality is encapsulated inside the Instrumenter API.Marks the span as the server span in the passed context.
-
-