public interface CurrentTraceContext
| Modifier and Type | Interface and Description |
|---|---|
static interface |
CurrentTraceContext.Scope
Scope of a span.
|
| Modifier and Type | Method and Description |
|---|---|
TraceContext |
context() |
CurrentTraceContext.Scope |
maybeScope(TraceContext context)
Like
newScope(TraceContext), except returns a noop scope if the given
context is already in scope. |
CurrentTraceContext.Scope |
newScope(TraceContext context)
Sets the current span in scope until the returned object is closed.
|
<C> Callable<C> |
wrap(Callable<C> task)
Wraps a task in a trace representation.
|
Executor |
wrap(Executor delegate)
Wraps an executor in a trace representation.
|
ExecutorService |
wrap(ExecutorService delegate)
Wraps an executor service in a trace representation.
|
Runnable |
wrap(Runnable task)
Wraps a task in a trace representation.
|
@Nullable TraceContext context()
TraceContext or null if not set.CurrentTraceContext.Scope newScope(@Nullable TraceContext context)
context - span to place into scope or null to clear the scopeCurrentTraceContext.Scope maybeScope(@Nullable TraceContext context)
newScope(TraceContext), except returns a noop scope if the given
context is already in scope.context - span to place into scope or null to clear the scope<C> Callable<C> wrap(Callable<C> task)
C - task return typetask - task to wrapRunnable wrap(Runnable task)
task - task to wrapExecutor wrap(Executor delegate)
delegate - executor to wrapExecutorService wrap(ExecutorService delegate)
delegate - executor service to wrapCopyright © 2021 Pivotal Software, Inc.. All rights reserved.