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