Class ClientSpan
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.tracer.ClientSpan
-
public final class ClientSpan extends Object
This class encapsulates the context key for storing the currentSpanKind.CLIENTspan 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.CLIENTspan is present in the passedcontext.static @Nullable io.opentelemetry.api.trace.SpanfromContextOrNull(io.opentelemetry.context.Context context)Returns span of typeSpanKind.CLIENTfrom the given context ornullif not found.static io.opentelemetry.context.Contextwith(io.opentelemetry.context.Context context, io.opentelemetry.api.trace.Span clientSpan)
-
-
-
Method Detail
-
exists
public static boolean exists(io.opentelemetry.context.Context context)
Returns true when aSpanKind.CLIENTspan is present in the passedcontext.
-
fromContextOrNull
public static @Nullable io.opentelemetry.api.trace.Span fromContextOrNull(io.opentelemetry.context.Context context)
Returns span of typeSpanKind.CLIENTfrom the given context ornullif not found.
-
with
public static io.opentelemetry.context.Context with(io.opentelemetry.context.Context context, io.opentelemetry.api.trace.Span clientSpan)
-
-