Returns a Tracing instance with captured Contexts so it's cheap to reuse.
Turn trace recording off.
Turn trace recording on.
Whether or not trace recording is enabled on this process: false
indicates it
was shutdown either via -com.twitter.finagle.tracing.enabled
flag or Trac.disable()
API.
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.
Return true if tracing is enabled with a good tracer pushed and at least one tracer decides to actively trace the current id.
Return 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.
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.
A singleton instance of Tracing (a facade-style API) that performs a number of Contexts lookups on each operation. Prefer "capturing" a Tracing instance for batching lookups.
Tracing