Skip to Content
Tares

How does an AI SRE read logs from Vercel projects while investigating 5xx errors on an API?

Tares receives your Vercel logs through a log drain pointed at a vercel source, so every log entry becomes an event your agent can read while it investigates a 5xx alert. Each entry carries the project, environment and source, plus the path, host, deployment and branch. Your agent reads them through the same Tares read surface it uses for the rest of the incident. This is the log side of the AI SRE setup.

How it works

Tares has a push source for Vercel, so Vercel delivers logs to Tares and nothing is polled. You point a Vercel log drain (JSON) at the source’s ingest endpoint. Tares stores one event per log entry.

Every entry is keyed by project, taken from the payload’s projectName, or projectId when the name is missing. One drain can carry several projects, and each appears as its own entity. That keeps a Vercel API project separate from your web frontend even when both send through one drain.

These labels are provided on each entry:

  • project: the key.
  • environment: production or preview.
  • source: lambda, build, edge, static, external or redirect.
  • path, host, deployment and branch.

During a 5xx investigation these labels let the agent narrow the log lines. It can look at production only, at lambda or edge entries, at a single path, or at the deployment and branch that went live before the errors started.

The agent side is the one the AI SRE guide describes. Tares handles ingestion, correlation, triggers and the MCP read surface, and you bring the agent. A trigger can wake the agent when an alert arrives, or you can ask a connected MCP client to investigate on demand. In both cases it reads the evidence from Tares instead of querying each system separately.

Set it up

  1. Make the ingest endpoint publicly reachable. Vercel delivers from its cloud, so a bare localhost daemon does not receive drains. Use a deployed instance or a tunnel.

  2. Create the source. In the console go to Sources, then Add source, then vercel. There is no required config, and the project, environment and source labels 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 calls create_source and returns the ingest endpoint.

    - name: web-logs connector: vercel config: labels: - { name: project, field: project, primary: true } - { name: environment, field: environment } - { name: source, field: source }
  3. Copy the ingest endpoint from the source page. It is a stable URL under /ingest/ that ends in the source’s ingest key. POST /api/sources with the same object also returns the ingest_key.

  4. In Vercel, open Team Settings, then Log Drains, then Add Log Drain. Set the endpoint to your ingest URL and the delivery format to JSON. Vercel verifies the endpoint with an x-vercel-verify header, and Tares echoes it back from Vercel’s verification request.

  5. If Tares has auth on, add the credential to the drain as a custom header. The sender uses a Bearer Authorization header holding an ingest-scoped API key. It is needed only when Tares has auth on.

  6. Start the read side for your agent. On a local Tares, run the MCP endpoint in a second shell and point your client at it:

    tares up tares mcp
  7. Verify the flow. Once traffic reaches the drain, Recent events on the source shows entries arriving. Fields shows which projects appear and how complete each field is. If project reads sparse, pick a denser field as the key, or slice by source or environment.

For the full source reference, see Vercel logs.

What you get

  • Each Vercel log entry arrives as a single event with its project, environment, source, path, host, deployment and branch.
  • Several Vercel projects share one drain and stay separate entities.
  • Your agent reads log lines from Tares during a 5xx investigation, so it can tie the failure to specific evidence lines.
  • You can check ingestion yourself in Recent events and Fields before relying on it in an incident.
  • The agent can write its conclusion back, so the next investigation starts from the previous finding. The AI SRE guide walks through that loop end to end.

When something else fits

  • If your API runs in containers you control, the docker_logs connector tails a container’s logs directly, and OTLP fits an OpenTelemetry pipeline. Both are covered in the AI SRE guide.
  • If you cannot expose a public ingest endpoint, a Vercel drain will not reach Tares, because Vercel delivers from its cloud. Deploy Tares or use a tunnel first.

Still stuck? Get help

Last updated on