What you get
One event per deployment state change:
Each event carries the deployment ID and URL, the target (
production or preview), and, when the project is connected to a Git repository, the commit SHA, message, author and branch. Deploys made with the Vercel CLI carry no commit information.
Step 1: Add a forwarder route
Vercel webhooks can’t add custom headers, so they can’t send to Bronto’s ingestion endpoint directly. A route in your app receives them, checks the signature and writes each event with the OpenTelemetry Logs SDK. This one is a Next.js route handler; any HTTP endpoint works.app/api/vercel-webhook/route.ts
OTEL_EXPORTER_OTLP_ENDPOINT to https://ingestion.eu.bronto.io (or https://ingestion.us.bronto.io) and OTEL_EXPORTER_OTLP_HEADERS to x-bronto-api-key=<YOUR_API_KEY> in the project’s environment variables, the same as for OpenTelemetry from code. The versions match the OpenTelemetry JS 2.x packages that @vercel/otel 2 uses.
Step 2: Create the webhook
In the Vercel dashboard, open Team Settings → Webhooks, addhttps://<your-domain>/api/vercel-webhook as the endpoint, select the five deployment events above, and choose the projects. Or use the REST API:
secret. Store it as VERCEL_WEBHOOK_SECRET in the project’s environment variables and redeploy. Events for the deployment that adds the forwarder itself may arrive before the route exists; from the next deploy on, all events arrive.
Step 3: Query deploys in Bronto
The events land in the dataset named afterservice.name (vercel-deployments). OTLP attributes keep a $ prefix in queries:
To find errors that came with a deploy, take its deployment ID and search the log drain for
deploymentId = 'dpl_…' AND level = 'error'.
Things to know
- Events can arrive twice. In testing, Vercel delivered
deployment.canceledtwice for one deployment. Deduplicate onvercel.event.idif you count deploys. deployment.promotedhas no target field. Treat promotion as production.- Failed builds don’t log at
level: error. In testing, their error output arrived in the log drain atlevel: infowithtype: stderr; thedeployment.errorevent is the reliable signal.
Example
The lab petclinic-agent has the forwarder atapps/web/app/api/vercel-webhook/route.ts, writing to any OTLP backend through the standard OTEL_EXPORTER_OTLP_* variables.
