@ThreadSafe public final class DefaultCorrelationContextManager extends Object implements CorrelationContextManager
CorrelationContextManager.| Constructor and Description |
|---|
DefaultCorrelationContextManager() |
| Modifier and Type | Method and Description |
|---|---|
CorrelationContext.Builder |
contextBuilder()
Returns a new
Builder. |
CorrelationContext |
getCurrentContext()
Returns the current
CorrelationContext. |
static CorrelationContextManager |
getInstance()
Returns a
CorrelationContextManager singleton that is the default implementation for
CorrelationContextManager. |
io.opentelemetry.context.Scope |
withContext(CorrelationContext distContext)
Enters the scope of code where the given
CorrelationContext is in the current context
(replacing the previous CorrelationContext) and returns an object that represents that
scope. |
public static CorrelationContextManager getInstance()
CorrelationContextManager singleton that is the default implementation for
CorrelationContextManager.CorrelationContextManager singleton that is the default implementation for
CorrelationContextManager.public CorrelationContext getCurrentContext()
CorrelationContextManagerCorrelationContext.getCurrentContext in interface CorrelationContextManagerCorrelationContext.public CorrelationContext.Builder contextBuilder()
CorrelationContextManagerBuilder.contextBuilder in interface CorrelationContextManagerBuilder.public io.opentelemetry.context.Scope withContext(CorrelationContext distContext)
CorrelationContextManagerCorrelationContext is in the current context
(replacing the previous CorrelationContext) and returns an object that represents that
scope. The scope is exited when the returned object is closed.withContext in interface CorrelationContextManagerdistContext - the CorrelationContext to be set as the current context.CorrelationContext is set as the
current context.