@Immutable
public final class TracingContextUtils
extends java.lang.Object
Context
.Modifier and Type | Method and Description |
---|---|
static io.opentelemetry.context.Scope |
currentContextWith(Span span)
|
static Span |
getCurrentSpan()
|
static Span |
getSpan(io.grpc.Context context)
|
static Span |
getSpanWithoutDefault(io.grpc.Context context)
Returns the
Span from the specified Context . |
static io.grpc.Context |
withSpan(Span span,
io.grpc.Context context)
Creates a new
Context with the given Span set. |
public static io.grpc.Context withSpan(Span span, io.grpc.Context context)
Context
with the given Span
set.span
- the value to be set.context
- the parent Context
.public static Span getCurrentSpan()
Span
from the current Context
.public static Span getSpan(io.grpc.Context context)
context
- the specified Context
.Span
from the specified Context
.@Nullable public static Span getSpanWithoutDefault(io.grpc.Context context)
Span
from the specified Context
. If none is found, this method
returns {code null}.context
- the specified Context
.Span
from the specified Context
.