SECURITY Signal 217
Export AI Gateway traces with Vercel Drains
Vercel AI Gateway now emits an OpenTelemetry trace for each request and lets Pro and Enterprise teams export those traces via Vercel Drains to any OTLP/HTTP endpoint, with configurable sampling and a per-trace cost.
Engineers gain end-to-end visibility of AI gateway requests, including model routing, retries, token usage, latency, and cost, without exposing prompt or completion data. The traces can be fed into existing observability stacks such as Sentry or Braintrust, enabling unified debugging and performance analysis. Pricing is transparent, charging per delivered trace and data transferred, so teams can predict the observability expense.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
Traces are generated for every AI Gateway request and can be sent to any OTLP/HTTP-compatible endpoint through Vercel Drains.
Each trace contains model/provider routing, fallback/retry attempts, token usage and cost, timing metrics, and attribution tags, but excludes prompt and completion content.
AI Gateway traces cost $0.05 per 1,000 successful deliveries plus $0.50 per GB of data transferred, with no charge for failed deliveries.
THE READ
What the cluster adds up to.
Vercel AI Gateway now creates an OpenTelemetry trace for every request it processes. These traces can be exported through Vercel Drains to any endpoint that accepts OTLP over HTTP. The documentation lists native integrations for Braintrust, Dash0, Kubiks, Sentry, and Statsig. Access to this feature is limited to teams on the Pro and Enterprise plans.
To enable the export, an engineer configures an AI Gateway Trace Drain, selects the projects to monitor, and sets a sampling rate. Each trace captures the full request lifecycle: model and provider selection, any fallback or retry attempts, token usage and associated cost, time to first token, total request duration, and the final response status. Traces also include attribution fields such as project, deployment, API key, environment, and custom tags. The trace payload deliberately omits the prompt text and the model completion. Sampling controls allow the team to decide what fraction of traffic is sent to each drain.
AI Gateway traces are billed at $0.05 for each group of 1,000 traces successfully delivered to a drain. In addition, the standard Drains charge of $0.50 per gigabyte of transferred data applies. A request counts once per successful drain delivery, even if the gateway attempted multiple providers before succeeding. Failed delivery attempts do not incur a trace charge.
Delivered trace events can be viewed by count, and broken out by project, drain, or source. Engineers can set up a Trace Drain from the team’s Drains settings page or follow the AI Gateway documentation for detailed steps. The feature is unavailable to lower-tier teams; only Pro and Enterprise customers can use it. Because traces exclude prompt and completion content, they provide observability while addressing privacy concerns.
Written by elseif from the cluster below · checked for specifics the sources never containedTHE CLUSTER
↗