public final class ContextUtils extends Object
Context.
Users must interact with the current Context via the public APIs in Tracer and avoid
usages of the CONTEXT_SPAN_KEY directly.
| Modifier and Type | Method and Description |
|---|---|
static Span |
getValue(io.grpc.Context context)
Returns the value from the specified
Context. |
static io.grpc.Context |
withValue(io.grpc.Context context,
Span span)
Creates a new
Context with the given value set. |
public static io.grpc.Context withValue(io.grpc.Context context,
Span span)
Context with the given value set.context - the parent Context.span - the value to be set.public static Span getValue(io.grpc.Context context)
Context.context - the specified Context.Context.