Turn trace recording off.
Turn trace recording on.
True if there is an identifier for the current trace.
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.
Returns true if tracing is enabled with a good tracer pushed and the current trace is sampled
true if the current trace id is terminal
Run computation f
with all tracing state (tracers, trace id)
cleared.
Run computation f
with the given traceId.
Run computation f
with the given traceId.
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
A version of [com.twitter.finagle.tracing.Trace.letId] providing an optional ID.
A version of [com.twitter.finagle.tracing.Trace.letId] providing an
optional ID. If the argument is None, the computation f
is run without
altering the trace environment.
Run computation f
with tracer
added onto the tracer stack.
Run computation f
with the given tracer and trace id.
Run computation f
with the given tracer and trace id.
true if the next traceId is a terminal id. Future attempts to set nextId will be ignored.
Run computation f
with the given tracer, and a derivative TraceId.
Run computation f
with the given tracer, and a derivative TraceId.
The implementation of this function is more efficient than calling
letTracer, nextId and letId sequentially as it minimizes the number
of request context changes.
the tracer to be pushed
true if the next traceId is a terminal id. Future attempts to set nextId will be ignored.
Create a derived id from the current TraceId.
Record a raw Record.
Record a raw Record. This will record to a _unique_ set of tracers in the stack.
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.
Convenience method for event loops in services.
Convenience method for event loops in services. Put your service handling code inside this to get proper tracing with all the correct fields filled in.
the current list of tracers
(Since version 6.13.x) Use recordRpc and recordServiceName
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.