Skip to main content

1. Installation

First install the TraceAI + Vercel packages (and OpenTelemetry peer deps). Pick your favourite package manager:
Note Vercel currently supports OpenTelemetry v1.x. Avoid installing @opentelemetry/* 2.x packages.

2. Set Environment Variables

Configure your Future AGI credentials (locally via .env, or in Vercel Project → Settings → Environment Variables).

3. Initialise tracing

Create instrumentation.ts and import it once on the server (e.g. in _app.tsx or at the top of your first API route).
instrumentation.ts

4. Instrument an API Route

Our instrumentation is automatic—just import and call the register function inside each serverless function.
pages/api/story.ts
That’s it—deploy to Vercel and watch traces flow into Observe → Traces in real time 🎉