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,environmentandsourcelabels are pre-filled, withprojectas 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-verifyheader. Tares echoes that value back from Vercel’s verification request. - The labels you can use are
project(from the payload’sprojectName, elseprojectId),environment(productionorpreview),source(lambda,build,edge,static,externalorredirect),path,host,deploymentandbranch.
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
-
Make sure your Tares ingest endpoint is reachable from the public internet, either on a deployed instance or through a tunnel.
-
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_sourceand returns the ingest endpoint. You can alsoPOST /api/sourceswith the same object, and the response includes theingest_key. -
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 }- Copy the ingest endpoint from the source page.
- 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.
- If your Tares instance has auth on, create an API key with the
ingestscope 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. - Save the drain. Vercel sends its verification request, and Tares echoes back the
x-vercel-verifyvalue. - 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,deploymentandbranchare 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
projectreads sparse, pick a denser field as the key, or slice bysourceorenvironment.
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.
Related
Still stuck? Get help