コンテンツにスキップ

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>