Skip to content

AxTracer

Interface: AxTracer

Methods

startActiveSpan()

startActiveSpan(name, options, fn)

startActiveSpan<F>(name, options, fn): ReturnType<F>

Starts a new AxSpan with the specified options and executes the provided function. The span is automatically closed after the function executes.

Type Parameters

F extends (span) => unknown

Parameters

name: string

The name of the span.

options: Readonly<AxSpanOptions>

AxSpan options to apply to the span.

fn: F

The function to execute within the span’s context.

Returns

ReturnType<F>

The return value of the function.

Defined in

src/ax/trace/index.ts:204

startActiveSpan(name, options, context, fn)

startActiveSpan<F>(name, options, context, fn): ReturnType<F>

Starts a new AxSpan with the specified options and context, then executes the provided function. The span is automatically closed after the function executes.

Type Parameters

F extends (span) => unknown

Parameters

name: string

The name of the span.

options: Readonly<AxSpanOptions>

AxSpan options to apply to the span.

context: AxContext

Context to be used for the span.

fn: F

The function to execute within the span’s context.

Returns

ReturnType<F>

The return value of the function.

Defined in

src/ax/trace/index.ts:218


startSpan()

startSpan(name, options?, context?): AxSpan

Parameters

name: string

options?: Readonly<AxSpanOptions>

context?: AxContext

Returns

AxSpan

Defined in

src/ax/trace/index.ts:225