OpenTelemetry
Vercel AI SDK
The AI SDK emits OpenTelemetry spans for each call when telemetry is enabled. Register an OpenTelemetry exporter in your app, point it at your collector, and import the traces.
- Register the OpenTelemetry SDK in your app with an OTLP exporter pointed at your collector.
- Turn on telemetry per call and give each call the blueprint's step name.
- Follow the OpenTelemetry panel to import.
Name each call after its step
const { text } = await generateText({
model,
prompt,
experimental_telemetry: { isEnabled: true, functionId: "draft_reply" },
});Where the log lands
In your collector's trace file.
How it reaches the harness
Copy the file to where you run the harness.