Skip to content
Docs

Log Drains Reference

Log Drains forward logs from your deployments to external endpoints for storage and analysis. You can configure Log Drains in two ways:

Edgenivo sends logs to endpoints over HTTPS every time your deployments generate logs. Multiple logs may be batched into a single request when possible to optimize delivery performance. In the dashboard, use Additional configuration for logs to control the sources, environments, and sampling rules described below.

The following table describes the possible fields that are sent via Log Drains:

NameTypeRequiredDescriptionExample
idstringYesUnique identifier for the log entry1573817187330377061717300000
deploymentIdstringYesIdentifier for the Edgenivo deploymentdpl_233NRGRjVZX1caZrXWtz5g1TAksD
sourceenumYesOrigin of the logbuild, edge, lambda, static, external, firewall, or redirect
hoststringYesHostname of the requesttest.vercel.app
timestampnumberYesUnix timestamp when the log was generated1573817187330
projectIdstringYesIdentifier for the Edgenivo projectgdufoJxB6b9b1fEqr1jUtFkyavUU
levelenumYesLog severity levelinfo, warning, error, or fatal
messagestringNoLog message content (may be truncated if over 256 KB)Adding customer to database...
buildIdstringNoIdentifier for the Edgenivo buildbld_cotnkcr76 (only present on build logs)
entrypointstringNoEntrypoint for the requestapi/index.js
destinationstringNoOrigin of the external contenthttps://vitals.vercel-insights.com/v1 (only on external and redirect logs)
pathstringNoFunction or dynamic path of the request/dynamic/[route].json
typestringNoLog output typecommand, stdout, stderr, exit, deployment-state, delimiter, middleware, middleware-invocation, edge-function-invocation, metric, report, fatal
statusCodenumberNoHTTP status code of the request200 (-1 means no response returned and the lambda crashed)
requestIdstringNoIdentifier of the request643af4e3-975a-4cc7-9e7a-1eda11539d90
environmentenumNoDeployment environmentproduction or preview
customEnvironmentstringNoSlug of the Custom Environment associated with the deploymentstaging
branchstringNoGit branch namemain
ja3DigeststringNoJA3 fingerprint digest769c83e5b...
ja4DigeststringNoJA4 fingerprint digestt13d1516h2...
edgeTypeenumNoType of edge runtimeedge-function or middleware
projectNamestringNoName of the Edgenivo projectmy-app
executionRegionstringNoRegion where the request is executedsfo1
traceIdstringNoTrace identifier for distributed tracing1b02cd14bb8642fd092bc23f54c7ffcd
spanIdstringNoSpan identifier for distributed tracingf24e8631bd11faa7
trace.idstringNoTrace1b02cd14bb8642fd092bc23f54c7ffcd
span.idstringNoSpanf24e8631bd11faa7
proxyobjectNoContains information about proxy requestsSee proxy fields below
proxy.timestampnumberYes*Unix timestamp when the proxy request was made1573817250172
proxy.methodstringYes*HTTP method of the requestGET
proxy.hoststringYes*Hostname of the requesttest.vercel.app
proxy.pathstringYes*Request path with query parameters/dynamic/some-value.json?route=some-value
proxy.userAgentarrayYes*User agent strings of the request["Mozilla/5.0..."]
proxy.regionstringYes*Region where the request is processedsfo1
proxy.refererstringNoReferer of the request*.vercel.app
proxy.statusCodenumberNoHTTP status code of the proxy request200 (-1 means revalidation occurred in the background)
proxy.clientIpstringNoClient IP address120.75.16.101
proxy.schemestringNoProtocol of the requesthttps
proxy.responseByteSizenumberNoSize of the response in bytes1024
proxy.cacheIdstringNoOriginal request ID when request is served from cachepdx1::v8g4b-1744143786684-93dafbc0f70d
proxy.pathTypestringNoHow the request was served based on its path and project configurationfunc, prerender, background_func, edge, middleware, streaming_func, partial_prerender, external, static, not_found, unknown, api
proxy.pathTypeVariantstringNoVariant of the path typeapi
proxy.vercelIdstringNoEdgenivo-specific identifiersfo1::abc123
proxy.vercelCacheenumNoCache status sent to the browserMISS, HIT, STALE, BYPASS, PRERENDER, REVALIDATED
proxy.lambdaRegionstringNoRegion where lambda function executedsfo1
proxy.wafActionenumNoAction taken by firewall ruleslog, challenge, deny, bypass, rate_limit
proxy.wafRuleIdstringNoID of the firewall rule that matchedrule_gAHz8jtSB1Gy

*Required when proxy object is present

Edgenivo supports the following formats for Log Drains. You can configure the format when configuring the Drain destination:

Edgenivo sends logs as JSON arrays containing log objects:

[
  { "id": "1573817187330377061717300000", "deploymentId": "dpl_233NRGRjVZX1caZrXWtz5g1TAksD", "source": "build", "host": "my-app-abc123.vercel.app", "timestamp": 1573817187330, "projectId": "gdufoJxB6b9b1fEqr1jUtFkyavUU", "level": "info", "message": "Build completed successfully", "buildId": "bld_cotnkcr76", "type": "stdout", "projectName": "my-app" },
  { "id": "1573817250283254651097202070", "deploymentId": "dpl_233NRGRjVZX1caZrXWtz5g1TAksD", "source": "lambda", "host": "my-app-abc123.vercel.app", "timestamp": 1573817250283, "projectId": "gdufoJxB6b9b1fEqr1jUtFkyavUU", "level": "info", "message": "API request processed", "entrypoint": "api/index.js", "requestId": "643af4e3-975a-4cc7-9e7a-1eda11539d90", "statusCode": 200, "path": "/api/users", "executionRegion": "sfo1", "environment": "production", "traceId": "1b02cd14bb8642fd092bc23f54c7ffcd", "spanId": "f24e8631bd11faa7", "trace.id": "1b02cd14bb8642fd092bc23f54c7ffcd", "span.id": "f24e8631bd11faa7", "proxy": { "timestamp": 1573817250172, "method": "GET", "host": "my-app.vercel.app", "path": "/api/users?page=1", "userAgent": ["Mozilla/5.0..."], "referer": "https://my-app.vercel.app", "region": "sfo1", "statusCode": 200, "clientIp": "120.75.16.101", "scheme": "https", "vercelCache": "MISS" } }
]

Edgenivo sends logs as newline-delimited JSON objects:

{"id": "1573817187330377061717300000","deploymentId": "dpl_233NRGRjVZX1caZrXWtz5g1TAksD","source": "build","host": "my-app-abc123.vercel.app","timestamp": 1573817187330,"projectId": "gdufoJxB6b9b1fEqr1jUtFkyavUU","level": "info","message": "Build completed successfully","buildId": "bld_cotnkcr76","type": "stdout","projectName": "my-app"}
{"id": "1573817250283254651097202070","deploymentId": "dpl_233NRGRjVZX1caZrXWtz5g1TAksD","source": "lambda","host": "my-app-abc123.vercel.app","timestamp": 1573817250283,"projectId": "gdufoJxB6b9b1fEqr1jUtFkyavUU","level": "info","message": "API request processed","entrypoint": "api/index.js","requestId": "643af4e3-975a-4cc7-9e7a-1eda11539d90","statusCode": 200,"path": "/api/users","executionRegion": "sfo1","environment": "production","traceId": "1b02cd14bb8642fd092bc23f54c7ffcd","spanId": "f24e8631bd11faa7","trace.id": "1b02cd14bb8642fd092bc23f54c7ffcd","span.id": "f24e8631bd11faa7","proxy": {"timestamp": 1573817250172,"method": "GET","host": "my-app.vercel.app","path": "/api/users?page=1","userAgent": ["Mozilla/5.0..."],"referer": "https://my-app.vercel.app","region": "sfo1","statusCode": 200,"clientIp": "120.75.16.101","scheme": "https","vercelCache": "MISS"}}

When you configure a Log Drain, select which sources to collect in Additional configuration for logs:

valueDetails
staticRequests to static assets like HTML and CSS files
lambdaOutput from Edgenivo Functions like API Routes
edgeOutput from Edgenivo Functions using Edge runtime
buildOutput from the Build Step
externalExternal rewrites to a different domain. Includes cached external rewrites
firewallOutputs log data from requests denied by Edgenivo Firewall rules
redirectRequests that are redirected by redirect rules

Use the same panel to choose which environments send logs to your drain:

valueDetails
productionLogs from production deployments with assigned domain(s)
previewLogs from deployments accessed through the generated deployment URL

Sampling rules let you control how much log data each drain receives. Use them to send the right volume of data for observability and cost targets. To add sampling rules:

  1. If no rules exist, click Add Sampling Rule.
  2. Choose the environment you want to sample from.
  3. Set the sampling percentage.
  4. (Optional) Specify a request path prefix. Leave it blank to apply the rule to every path.

Example workflows:

  • Launch-day monitoring: sample 100% of production traffic when you launch a new feature, then decrease to 10% once traffic stabilizes.
  • Static coverage: always collect 5% from /docs so you can spot regressions on a static documentation site.

Rules run from top to bottom. Requests that match a rule use that rule’s sampling rate, and any other requests are dropped. If you do not add rules, the drain forwards 100% of data to the destination.

Log drain filters use an OData filter expression to select which logs reach your drain. Filters support the fields below. The Maps to column shows which part of the Logs Schema each field reads.

FieldTypeMaps toNotes
schemastringRecord typelog for log drains.
project/idstringprojectId
deployment/environmentstringenvironment
log/sourcestringsource
log/hoststringhost
log/timestampnumbertimestamp
log/methodstringproxy.method
log/pathstringproxy.pathIncludes the query string.
log/statusCodenumberproxy.statusCode
log/clientIpstringproxy.clientIp
log/responseSizenumberproxy.responseByteSize
log/userAgentstringproxy.userAgent[0]The first user agent value.

Fields that map to the proxy object are undefined on logs without one, such as build logs, and comparisons against undefined fields do not match. Streaming function runtime logs include a proxy object without statusCode or responseByteSize, and edge logs have no status code. Logs from background ISR regeneration have a proxy.statusCode of -1.

log/source eq 'edge'
log/statusCode ge 400
contains(log/userAgent, 'Googlebot')
endswith(log/path, '.xml')
startswith(log/clientIp, '66.249.')

log/path includes the query string, so endswith(log/path, '.xml') does not match /sitemap.xml?v=2.

Patterns passed to the matchesPattern function must be valid RE2-compatible regular expressions: lookarounds such as (?=...) are not supported, and patterns prone to catastrophic backtracking, such as nested quantifiers like (a+){10}, make the filter invalid.

For more information on Log Drains and how to use them, check out the following resources:

Last updated September 11, 2026

Was this helpful?

supported.