Package io.opencensus.trace.unsafe
Class ContextUtils
- java.lang.Object
-
- io.opencensus.trace.unsafe.ContextUtils
-
@Deprecated public final class ContextUtils extends java.lang.ObjectDeprecated.Please useContextHandleUtilsUtil methods/functionality to interact with theContext. Users must interact with the current Context via the public APIs inTracerand avoid usages of theCONTEXT_SPAN_KEYdirectly.Utilities for grabbing manipulating current context and grabbing current span.- Since:
- 0.5
-
-
Field Summary
Fields Modifier and Type Field Description private static io.grpc.Context.Key<Span>CONTEXT_SPAN_KEYDeprecated.TheContext.Keyused to interact withContext.
-
Constructor Summary
Constructors Modifier Constructor Description privateContextUtils()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SpangetValue(io.grpc.Context context)Deprecated.Returns the value from the specifiedContext.static io.grpc.ContextwithValue(io.grpc.Context context, Span span)Deprecated.Creates a newContextwith the given value set.
-
-
-
Field Detail
-
CONTEXT_SPAN_KEY
private static final io.grpc.Context.Key<Span> CONTEXT_SPAN_KEY
Deprecated.TheContext.Keyused to interact withContext.
-
-
Method Detail
-
withValue
public static io.grpc.Context withValue(io.grpc.Context context, @Nullable Span span)Deprecated.Creates a newContextwith the given value set.- Parameters:
context- the parentContext.span- the value to be set.- Returns:
- a new context with the given value set.
- Since:
- 0.21
-
getValue
public static Span getValue(io.grpc.Context context)
Deprecated.Returns the value from the specifiedContext.- Parameters:
context- the specifiedContext.- Returns:
- the value from the specified
Context. - Since:
- 0.21
-
-