How do I correlate error spikes with Vercel deploys using an AI SRE?
Tares correlates error spikes with Vercel deploys by ingesting your Vercel log drain into a vercel source, so each log entry carries its project, environment, deployment and branch next to the errors. Your agent reads these entries on one timeline and sees what changed and when the errors began. This page shows how to connect the drain and how to add deploy events from your CD pipeline.
How it works
Most root causes are a change, so the useful question is what changed just before the errors started. Tares answers it by putting changes and symptoms in order on a timeline that your agent reads, instead of leaving them in separate tools.
- Vercel log drain. The
vercelconnector is a push source. You point a Vercel log drain (JSON format) at the source’s ingest URL, and Tares stores one event per log entry. - Labels that tie errors to a change. Each entry carries
project(the key),environment(productionorpreview),source(lambda,build,edge,static,externalorredirect),path,host,deploymentandbranch. A burst of errors shows which deployment and branch produced it, andbuildentries show the build itself. - Several projects, one drain. A single drain can carry multiple projects. They appear as distinct entities.
- Deploy events from your pipeline. The AI SRE guide adds the change signal with a webhook source that uses
event_type: deployand a text template such asdeploy {commit} by {author}: {message}. Your CD pipeline posts to it on every deploy. The agent then sees a line like “deploy landed 14:02, errors started 14:04”. - Pull and push. An agent connected over MCP reads the timeline on demand. A trigger can also wake an agent when something fires, and the agent writes its finding back so the next investigation starts from it.
Set it up
- Make the ingest endpoint publicly reachable. Vercel delivers from its cloud, so use a deployed instance or a tunnel. A bare localhost daemon does not receive drains. Start Tares with
tares upwhere you run it.
tares up- Create the source. In the console go to Sources, Add source, vercel. There is no required config, and the
project,environmentandsourcelabels are pre-filled. You can also ask a connected agent: “Use tares to create a vercel source and give me the ingest URL for the log drain.” The equivalent definition is:
- name: web-logs
connector: vercel
config:
labels:
- { name: project, field: project, primary: true }
- { name: environment, field: environment }
- { name: source, field: source }- Copy the source’s ingest URL from its page. It is a stable URL on your host under the
/ingest/path. - In Vercel, open Team Settings, Log Drains, Add Log Drain. Set the endpoint to the ingest URL and the delivery format to JSON. Vercel verifies the endpoint with an
x-vercel-verifyheader, and Tares echoes it back from Vercel’s verification request. - If your Tares instance has auth on, add a custom header to the drain. The sender uses a Bearer Authorization header holding an ingest-scoped API key. Without auth on, you need no key.
- Check the result. Recent events shows entries arriving, and Fields shows which projects appear and how complete each field is. If
projectreads sparse, pick a denser field as the key, or slice bysourceorenvironment. - Add the pipeline deploy signal as the guide describes. Create a webhook source with
event_type: deploy, and have your CD pipeline post the commit, author and message on every deploy. - Connect an MCP client with
tares mcpand ask what happened to your service in the last 15 minutes. For a trigger that wakes an agent on an incident, follow the AI SRE guide. It walks through triggers, agents and findings end to end.
What you get
- Vercel log entries arrive as one event each, labeled by project, environment, source, path, host, deployment and branch.
- An error spike shows which deployment and branch it came from, so the agent can name a change as the likely cause.
- Pipeline deploy events record when each change landed, so the agent sees the order of events.
- Several Vercel projects through one drain appear as separate entities.
- Findings the agent writes back stay on the timeline, so the next investigation starts from the last conclusion.
- You keep your own alerting. Tares ingests what fires and correlates it with the evidence.
When something else fits
- If your deploys do not run on Vercel, send the deploy event from your CD pipeline to a webhook source instead of using a log drain.
- If you only need to look at logs and are not correlating changes with symptoms, the Vercel dashboard is enough. Tares adds value when the deploy and the errors need to sit in one place for an agent.
Related
Last updated on