Skip to Content
Tares

How do I connect logs from Vercel projects to Tares?

Tares connects Vercel logs through a vercel source that receives a Vercel log drain, with one event per log entry keyed by project. You create the source, copy its ingest URL into a Vercel log drain, and check that entries arrive under Recent events. One drain can carry several projects, and each appears as its own entity.

How it works

The vercel connector is a push source. Vercel delivers its logs from its own cloud to the source’s ingest endpoint, so nothing in Tares polls Vercel.

  • Each log entry becomes one event.
  • The project label is the primary label and the key. It comes from the payload’s projectName, or from projectId when the name is missing.
  • environment (production or preview) and source (lambda, build, edge, static, external or redirect) are labels you can slice by.
  • The connector also provides path, host, deployment and branch, which the console’s label editor offers.
  • The connector has no fields of its own. Its config is just labels.
  • Vercel checks the endpoint with an x-vercel-verify header, and Tares echoes it back from Vercel’s verification request.

The ingest endpoint must be publicly reachable. Use a deployed instance or a tunnel, because a bare localhost daemon cannot receive drains.

Once the logs are in, they join the other signals for the same service. Build an AI SRE shows how to key metrics, logs and alerts on one label so an agent reads one timeline. The connectors index lists the other ways to bring logs in, such as Docker logs for a container or OTLP for OpenTelemetry.

Set it up

  1. Make the endpoint reachable. Run Tares on a deployed instance or behind a tunnel, so Vercel can reach it over the internet.

  2. Create the source. Pick whichever path suits you. All three produce the same stored config.

    • 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 with no required config.
    • In the console, go to Sources → Add source → vercel. The project, environment and source labels are pre-filled, with project as the primary label. Save.
    • Declare it in the catalog YAML, or send the same object with POST /api/sources. The response includes the ingest_key.
- name: web-logs connector: vercel config: labels: - { name: project, field: project, primary: true } - { name: environment, field: environment } - { name: source, field: source }
  1. Copy the ingest URL. The source page shows a stable ingest endpoint in this form:
https://<host>/ingest/<ingest_key>
  1. Add the drain in Vercel. Go to Team Settings → Log Drains → Add Log Drain. Set the endpoint to the ingest URL and the delivery format to JSON. Vercel sends its verification request and Tares answers it.

  2. Add credentials only if Tares has auth on. On a secured instance, the drain’s custom header is an Authorization Bearer header holding an ingest-scoped API key. On an instance without auth, no header is needed.

  3. Check that lines arrive. Once the drain is saved and traffic flows, open the source. Recent events shows entries arriving. The Fields tab shows which projects appear and how well each field is covered. If project looks sparse, pick a denser field as the key, or slice by source or environment. The Vercel connector page has the full reference.

What you get

  • Every Vercel log entry from the drain is stored as an event in Tares, keyed by project.
  • A single drain covers multiple projects, and each shows up as a distinct entity.
  • You can slice by environment (production or preview) and by source, such as lambda, build or edge.
  • Path, host, deployment and branch are available as labels when you want finer cuts.
  • The Fields tab shows each field’s actual coverage, so you can tell whether the key is dense enough.
  • If you key other sources on the same label, the Vercel logs join that service’s timeline. Triggers and agents can then read them alongside metrics and alerts.

When something else fits

  • If the logs come from a container you run yourself, use the Docker logs connector. If your services are instrumented with OpenTelemetry, use OTLP. Both are listed on the connectors index.
  • If you cannot expose a public ingest endpoint, for example on a laptop with a bare localhost daemon, use a tunnel or a deployed instance first. Vercel cannot deliver drains to a local address.

Still stuck? Get help

Last updated on