콘텐츠로 이동

getOrCreateTrace

이 콘텐츠는 아직 번역되지 않았습니다.

function getOrCreateTrace<T>(fn, options?): Promise<T>;

This function will check if there is an existing active trace in the execution context. If there is, it will run the given function with the existing trace. If there is no trace, it will create a new one and assign it to the execution context of the function.

Type Parameter

T

Parameter Type Description

fn

() => Promise<T>

The fzunction to run and assign the trace context to.

options?

TraceOptions

Options for the creation of the trace

Promise<T>