Completely clear the trace stack.
Turn trace recording off.
Turn trace recording on.
Get the current trace identifier.
Get the current trace identifier. If no identifiers have been pushed, a default one is provided.
Get the current identifier, if it exists.
true if the current trace id is terminal
Create a derivative TraceId.
Create a derivative TraceId. If there isn't a current ID, this becomes the root id.
Push the given tracer.
Push the given tracer, create a derivative TraceId and set it to be the current trace id.
Push the given tracer, create a derivative TraceId and set it to be
the current trace id.
The implementation of this function is more efficient than calling
pushTracer, nextId and setId sequentially as it minimizes the number
of reads and writes to local
.
the tracer to be pushed
true if the next traceId is a terminal id. Future attempts to set nextId will be ignored.
Record a raw Record.
Record a raw Record. This will record to a _unique_ set of tracers in the stack
Set the current trace id Should be used with Trace.
Set the current trace id Should be used with Trace.unwind for stack-like properties
the TraceId to set as the current trace id
true if traceId is a terminal id. Future calls to set() after a terminal id is set will not set the traceId
Time an operation and add an annotation with that duration on it
Time an operation and add an annotation with that duration on it
return type
The message describing the operation
operation to perform
return value of the operation
Runs the function f and logs that duration until the future is satisfied with the given name.
the current list of tracers
Invoke f
and then unwind the stack to the starting point.
Trace
maintains the state of the tracing stack The currentTraceId
has a terminal flag, indicating whether it can be overridden with a differentTraceId
. Setting the currentTraceId
as terminal forces all future annotations to share thatTraceId
. When reporting, we report to all tracers in the list ofTracer
s.