Skip to content

withTrace

function withTrace<T>(
trace,
fn,
options?): Promise<T>

This function will create a new trace and assign it to the execution context of the function passed to it.

Type Parameter

T

Parameter Type Description

trace

string | Trace

fn

(trace) => Promise<T>

The function to run and assign the trace context to.

options?

TraceOptions

Options for the creation of the trace

Promise<T>