TracingChannel
The class TracingChannel
is a collection of TracingChannel Channels
which together express a single traceable action. It is used to formalize and simplify the process of producing events for tracing application flow. {@link tracingChannel} is used to construct a TracingChannel
. As with Channel
it is recommended to create and reuse a single TracingChannel
at the top-level of the file rather than creating them dynamically.
Since
v19.9.0
Properties
Functions
Helper to subscribe a collection of functions to the corresponding channels. This is the same as calling channel.subscribe(onMessage)
on each channel individually.
Trace a callback-receiving function call. This will always produce a start event
and end event
around the synchronous portion of the function execution, and will produce a asyncStart event
and asyncEnd event
around the callback execution. It may also produce an error event
if the given function throws an error or the returned promise rejects. This will run the given function using channel.runStores(context, ...)
on the start
channel which ensures all events should have any bound stores set to match this trace context.
Trace a promise-returning function call. This will always produce a start event
and end event
around the synchronous portion of the function execution, and will produce an asyncStart event
and asyncEnd event
when a promise continuation is reached. It may also produce an error event
if the given function throws an error or the returned promise rejects. This will run the given function using channel.runStores(context, ...)
on the start
channel which ensures all events should have any bound stores set to match this trace context.
Trace a synchronous function call. This will always produce a start event
and end event
around the execution and may produce an error event
if the given function throws an error. This will run the given function using channel.runStores(context, ...)
on the start
channel which ensures all events should have any bound stores set to match this trace context.
Helper to unsubscribe a collection of functions from the corresponding channels. This is the same as calling channel.unsubscribe(onMessage)
on each channel individually.