Function: getTracer()
Prefactor TypeScript SDK / @prefactor/packages/ai / getTracer
Function: getTracer()
Section titled “Function: getTracer()”getTracer():
Tracer
Defined in: packages/ai/src/init.ts:243
Get the current tracer instance.
If no tracer has been created yet, this will call init() with default configuration.
Returns
Section titled “Returns”Tracer
Tracer instance
Example
Section titled “Example”import { getTracer } from '@prefactor/ai';
const tracer = getTracer();// Use for custom span creationconst span = tracer.startSpan({ name: 'custom-operation', spanType: SpanType.CHAIN,});