The SDK route traces the apps you instrument, with full content. The drain covers every gateway request on your Vercel team without code changes. You can run both. Vercel’s gateway traces do not include prompt or completion content, so drain events in HoneyHive have empty inputs and outputs.
Quick Start
AI Gateway exposes an OpenAI-compatible API athttps://ai-gateway.vercel.sh/v1. HoneyHive traces the OpenAI SDK, not the gateway, so the OpenAI integration works unchanged. Model IDs use provider/model.
Last tested with
honeyhive 1.6.0, openai 3.20.0, and openinference-instrumentation-openai 0.1.61 (September 2026).- Chat completions - Inputs, outputs, and token usage
- Tool / function calls - Arguments and results for each tool invocation
- Streaming responses - Streamed completions with aggregated tokens
- Gateway response fields - The gateway returns
generationIdandusage.costin each response, and they arrive in the event’sconfig
https://ai-gateway.vercel.sh/v1 for OpenAI, https://ai-gateway.vercel.sh for Anthropic) and call that SDK’s instrumentor. Raw fetch / curl calls are not autotraced. The AI Gateway drain captures those requests.
AI Gateway drain (no code)
The drain forwards a trace of every gateway request your Vercel team makes, from any app, with no code changes. It needs a Vercel team on the Pro or Enterprise plan. Vercel bills each delivered trace plus trace egress. See Vercel’s trace drain pricing.Configure the drain
1
Create a HoneyHive ingestion key
Create an ingestion API key in Settings → Project → API Keys, on the Ingestion tab. The key sets which HoneyHive project receives the traces.
2
Add an AI Gateway drain
In the Vercel dashboard, go to Team Settings → Drains and click Add Drain. Select AI Gateway as the data type. A Traces drain sends your deployments’ request spans, not AI Gateway requests.
3
Point the custom endpoint at HoneyHive
Select Custom Endpoint and set:
For US production, the endpoint is
https://api.dp1.us.prod.honeyhive.ai/opentelemetry/v1/traces. Use the host shown in your HoneyHive dashboard.4
Create the drain and send a request
Click Create Drain, then send any request through AI Gateway, for example with the Quick Start code.
What HoneyHive records
Each gateway request is one OpenTelemetry trace withservice.name: ai-gateway. HoneyHive maps its spans to events:
Gateway-specific attributes arrive in
metadata with their original names. Useful ones:
vercel.ai_gateway.cost.totalandvercel.ai_gateway.cost.currency- Request cost, as Vercel billed it. Vercel sends the cost as a decimal string, so it arrives inmetadataas a stringvercel.ai_gateway.user.idandvercel.ai_gateway.tags- The user ID and tags you attached to the requestvercel.ai_gateway.generation.id- The generation ID in the AI Gateway dashboardvercel.ai_gateway.credential.type-byokorsystemvercel.ai_gateway.api_format- The API the client called:openai-compatfor Chat Completions,openresponses-compatfor the Responses APIvercel.ai_gateway.api_key.nameandvercel.ai_gateway.environment- The AI Gateway key that made the request, and the Vercel environmentgen_ai.response.time_to_first_chunk- Time to first token, in secondsvercel.ai_gateway.provider- The exact gateway provider slug (for examplevertexAnthropic).config.providerholds the OTel provider name instead (for exampleaws.bedrock)
service.name = ai-gateway. To see one gateway request, filter by the trace_id metadata field.
Troubleshooting
SDK traces not appearing
- Check the instrumentor - Call the instrumentor for your SDK with
tracer_provider=tracer.providerbefore creating the client or making requests - Confirm you use an instrumented SDK - Raw
fetch/curlto the gateway is not autotraced. Check the base URL:https://ai-gateway.vercel.sh/v1for OpenAI,https://ai-gateway.vercel.shfor Anthropic - Check
HH_INGESTION_API_KEY- Set it to an ingestion API key
Drain traces not appearing
- Data type - The drain must use the AI Gateway data type. A Traces drain forwards only
vercel.serverless-runtimeandvercel.edge-networkspans - Endpoint and header - The URL must end with
/opentelemetry/v1/traces, and the header must be exactlyAuthorization: Bearer <HH_INGESTION_API_KEY>. A wrong key returns401 - Project - The key sets the project. Check the project where you created the key