
Export AI Gateway traces with Vercel Drains
Quick Answer
Vercel AI Gateway now generates OpenTelemetry traces for each request, allowing Pro and Enterprise teams to send data to OTLP/HTTP endpoints via Vercel Drains.
Quick Take
Each trace includes detailed metrics like token usage and request duration, costing $0.05 per 1,000 traces plus standard data transfer fees.
Key Points
- AI Gateway traces include model routing, fallback attempts, and token usage metrics.
- Sampling controls allow teams to manage traffic volume sent to each drain.
- Traces are billed at $0.05 per 1,000 delivered, plus $0.50 per GB transferred.
- Failed trace deliveries do not incur charges, optimizing cost management.
- Teams can view trace events by count, project, or source for better insights.
📖 Reader Mode
~1 min readAI Gateway now produces an OpenTelemetry trace for every request. Pro and Enterprise teams can send these traces through Vercel Drains to any OTLP/HTTP-compatible endpoint, including native integrations for Braintrust, Dash0, Kubiks, Sentry, and Statsig.


Each trace shows the full request lifecycle, including:
Model and provider routing
Fallback and retry attempts
Token usage and cost
Time to first token, request duration, and response status
Project, deployment, API key, environment, and custom tag attribution
Trace Drains do not include prompt or completion content. Sampling controls let you choose how much traffic to export to each drain.
AI Gateway traces cost $0.05 per 1,000 traces delivered to each drain, plus the standard Drains rate of $0.50 per GB of data transferred. A request counts once per successful drain delivery, even when AI Gateway makes multiple provider attempts. Failed deliveries do not incur a trace charge.


Set up a Trace Drain from your team's Drains settings or learn more in the AI Gateway documentation.
— Originally published at vercel.com
Want this in your inbox every morning?
Daily brief at your local 8am — bilingual EN/中文, free.
More from Vercel AI
See more →
The Agent Stack
The Agent Stack by Vercel AI provides essential building blocks for creating production-grade agents, enabling seamless integration across multiple AI models and secure operations. It features components like AI Gateway for model routing, Workflow SDK for durable execution, and Vercel Connect for scoped access, streamlining agent development and deployment across various platforms.

