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
Createinstrumentation.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 theregister
function inside each serverless function.
pages/api/story.ts