How does an AI SRE read logs from Vercel projects while investigating high latency?
Tares receives Vercel logs through a log drain pointed at a vercel source’s ingest URL, so each log entry becomes an event your agent can read. Entries are keyed by project and labeled with environment and source, and one drain can carry several projects. During a high latency investigation, your agent reads those events from Tares alongside the other sources you connected.
How it works
The vercel source is a push source. Vercel delivers JSON log entries from its cloud to the source’s ingest endpoint, and Tares stores one event per log entry.
Each event carries these labels:
projectis the key, taken from the payload’sprojectName, elseprojectId. A drain with several projects shows up as distinct entities.environmentisproductionorpreview.sourceislambda,build,edge,static,externalorredirect.path,host,deploymentandbranchare also provided.
The path and host labels are useful when latency is concentrated on one route or domain. Sources that share the same key label land on one timeline, which is how the AI SRE guide merges metrics, logs and alerts on one clock. In that guide a trigger fires when an alert event arrives, such as the HighLatency alert, and wakes an agent that reads the correlated timeline. You can also connect an MCP client and ask for the last 15 minutes yourself.
Vercel delivers from its cloud, so the ingest endpoint must be publicly reachable. Use a deployed instance or a tunnel. A bare localhost daemon does not receive drains.
Set it up
-
Start Tares and make sure the ingest endpoint is reachable from the internet.
tares up -
Create the vercel 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 agent callscreate_sourceand returns the ingest endpoint. -
The source is the same as this definition:
- 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 endpoint. It is a stable URL that ends in /ingest/ followed by the ingest key.
POST /api/sourceswith the same object also works, and the response includes theingest_key. -
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 an Authorization header to the drain as a custom header. It uses the Bearer scheme and holds an ingest-scoped API key. The header is needed only when Tares has auth on.
-
Verify. Once traffic flows, Recent events shows entries arriving. Fields shows which projects appear and each field’s coverage. If
projectreads sparse, pick a denser field as the key, or slice bysourceorenvironment. -
Start the MCP endpoint in a second shell and point your client at it, so your agent can read the events. The Vercel connector page has the full reference for this source.
tares mcp
What you get
- Every Vercel log entry from the drain arrives as an event, keyed by project and labeled by environment and source.
- You can narrow a latency investigation to one project, to production or preview, or to one kind of source such as
lambdaoredge. - The
path,host,deploymentandbranchlabels let you tie slow requests to a route or a deployment. - One drain covers several projects, and each appears as its own entity.
- Your agent reads these log lines through Tares, either on demand over MCP or when a trigger wakes it on an alert.
- The Fields view shows how well each label is covered, so you know early if the key is too sparse.
When something else fits
- If your logs live in containers rather than on Vercel, the docker_logs or OTLP connectors fit better, as the AI SRE guide shows.
- If your Tares runs only on a laptop with no public URL, a Vercel drain cannot reach it until you add a tunnel or a deployed instance.