Skip to content

Function: withSpan()

Prefactor TypeScript SDK


Prefactor TypeScript SDK / @prefactor/packages/ai / withSpan

withSpan<T>(options, fn): Promise<T>

Defined in: packages/ai/src/init.ts:258

Wraps a function in a manual span using the shared core helper.

T

ManualSpanOptions

Manual span options.

() => T | Promise<T>

Function to execute in span context.

Promise<T>

Result from fn.