Skip to Content
Tares

How do I add a Vercel log drain that sends logs to Tares?

Tares receives Vercel logs through a vercel source: you create the source, copy its stable ingest URL, and add that URL as a JSON log drain in Vercel Team Settings. Tares answers Vercel’s verification check itself, so the drain saves without extra work. Each log entry becomes one event, keyed by project.

How it works

The Vercel connector is a push source. Vercel delivers logs from its cloud to an ingest endpoint that Tares gives the source.

  • The source has no required config. The project, environment and source labels are pre-filled, with project as the key.
  • Its ingest endpoint is a stable URL made of https, your host, /ingest/ and the source’s ingest key.
  • Each log entry becomes one event. One drain can carry several projects, and each appears as its own entity.
  • When you save the drain, Vercel verifies the endpoint with an x-vercel-verify header. Tares echoes that value back from Vercel’s verification request.
  • The labels you can use are project (from the payload’s projectName, else projectId), environment (production or preview), source (lambda, build, edge, static, external or redirect), path, host, deployment and branch.

The endpoint must be publicly reachable, because Vercel delivers from its cloud. Use a deployed instance or a tunnel. A bare localhost daemon does not receive drains.

Set it up

  1. Make sure your Tares ingest endpoint is reachable from the public internet, either on a deployed instance or through a tunnel.

  2. Create the source. In the app, go to Sources, then Add source, then vercel, and save. There is nothing to fill in. Or ask a connected agent from your AI SRE setup:

    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. You can also POST /api/sources with the same object, and the response includes the ingest_key.

  3. The source as a YAML object looks like this:

- 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 endpoint from the source page.
  2. In Vercel, open Team Settings, then Log Drains, then Add Log Drain. Set the endpoint to the ingest URL and the delivery format to JSON.
  3. If your Tares instance has auth on, create an API key with the ingest scope and add it to the drain as a custom header. The header is an Authorization header whose value is Bearer followed by the key. The sender needs this header only when Tares has auth on.
  4. Save the drain. Vercel sends its verification request, and Tares echoes back the x-vercel-verify value.
  5. Open the source and check that entries arrive. Recent events shows the incoming logs. Fields shows which projects appear and how well each field is covered.

What you get

  • Vercel logs land in Tares as one event per log entry, labeled by project, environment and source.
  • Several Vercel projects share a single drain and show up as separate entities.
  • Labels such as path, host, deployment and branch are available for slicing.
  • The ingest URL is stable, so you set the drain up once.
  • The Recent events and Fields views confirm that traffic flows and how complete each field is. If project reads sparse, pick a denser field as the key, or slice by source or environment.

When something else fits

  • If the drain cannot reach your instance because it runs on localhost, deploy Tares or put a tunnel in front of it before adding the drain.
  • If you need logs from something other than Vercel, pick the connector for that system from the Vercel connector neighbors in the connector list, such as OTLP for OpenTelemetry data.

Still stuck? Get help

Last updated on