public interface TraceScope extends Closeable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
TraceScope.Continuation
Used to pass async context between workers.
|
| Modifier and Type | Method and Description |
|---|---|
default TraceScope.Continuation |
capture()
Deprecated.
Replaced by
Tracer.captureActiveSpan().
When asynchronous propagation is enabled, prevent the currently active trace, which may differ from this scope instance, from reporting until the returned Continuation is either activated (and the returned scope is closed) or the continuation is canceled. Should be called on the parent thread. |
default TraceScope.Continuation |
captureConcurrent()
Deprecated.
Replaced by
capture().hold(). |
void |
close()
Close the activated context and allow any underlying spans to finish.
|
default boolean |
isAsyncPropagating()
Deprecated.
Replaced by
Tracer.isAsyncPropagationEnabled().
Calling this method will check whether asynchronous propagation is enabled for the active scope, not this scope instance. |
default void |
setAsyncPropagation(boolean value)
Deprecated.
Replaced by
Tracer.setAsyncPropagationEnabled(boolean)}.
Calling this method will enable or disable asynchronous propagation for the active scope, not this scope instance. |
void close()
close in interface AutoCloseableclose in interface Closeable@Deprecated default TraceScope.Continuation capture()
Tracer.captureActiveSpan().
When asynchronous propagation is enabled, prevent the currently active trace, which may differ from this scope instance, from reporting until the returned Continuation is either activated (and the returned scope is closed) or the continuation is canceled. Should be called on the parent thread.
@Deprecated default TraceScope.Continuation captureConcurrent()
capture().hold().@Deprecated default boolean isAsyncPropagating()
Tracer.isAsyncPropagationEnabled().
Calling this method will check whether asynchronous propagation is enabled for the active scope, not this scope instance.
true if asynchronous propagation is enabled for the active
scope, false otherwise.@Deprecated default void setAsyncPropagation(boolean value)
Tracer.setAsyncPropagationEnabled(boolean)}.
Calling this method will enable or disable asynchronous propagation for the active scope, not this scope instance.
value - true to enable asynchronous propagation, false to disable it.