Function: withSpan()
Prefactor TypeScript SDK / @prefactor/packages/langchain / withSpan
Function: withSpan()
Section titled “Function: withSpan()”withSpan<
T>(options,fn):Promise<T>
Defined in: packages/langchain/src/init.ts:229
Wraps a function in a manual span using the shared core helper.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”options
Section titled “options”ManualSpanOptions
Manual span options.
() => T | Promise<T>
Function to execute in span context.
Returns
Section titled “Returns”Promise<T>
Result from fn.