Skip to main content
Automatically capture agent runs, LLM calls, tool executions, and token usage from the Vercel AI SDK through its built-in OpenTelemetry support — no instrumentModules config required.

Setup

Call TraceRoot.initialize() and register the AI SDK’s OpenTelemetry integration before your first model call:
AI SDK 7 requires Node >=22.

Usage

Once initialized, every generateText / streamText call, model call, and tool execution is captured automatically:

What Gets Captured

Run the example

Clone the repo and run a complete agent end-to-end.

TypeScript

Run the TypeScript example