Package io.opencensus.trace.unsafe
Class ContextUtils
java.lang.Object
io.opencensus.trace.unsafe.ContextUtils
Deprecated.
Utilities for grabbing manipulating current context and grabbing current span.
- Since:
- 0.5
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final io.grpc.Context.Key
<Span> Deprecated.TheContext.Key
used to interact withContext
. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
CONTEXT_SPAN_KEY
Deprecated.TheContext.Key
used to interact withContext
.
-
-
Constructor Details
-
ContextUtils
private ContextUtils()Deprecated.
-
-
Method Details
-
withValue
Deprecated.Creates a newContext
with 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
Deprecated.Returns the value from the specifiedContext
.- Parameters:
context
- the specifiedContext
.- Returns:
- the value from the specified
Context
. - Since:
- 0.21
-
ContextHandleUtils
Util methods/functionality to interact with theContext
. Users must interact with the current Context via the public APIs inTracer
and avoid usages of theCONTEXT_SPAN_KEY
directly.