> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bronto.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Vercel Functions Telemetry

> Choose the ingestion path for Vercel Functions: runtime logs and timeouts through the log drain, Vercel's request spans through the trace drain, and your own spans with OpenTelemetry.

Vercel Functions emit runtime logs (your code's `stdout` and `stderr`, one line per `console.log`), platform lines such as timeouts and process exits, and spans: Vercel's own (`Resolve Route`, `Invoke Function`) and, when instrumented, your code's. Each log line carries the request's `traceId`, the `deploymentId` and the region the function ran in (`executionRegion`).

## Recommended method

[**Marketplace connector**](/integrations/vercel-connector.md): its log drain carries runtime logs (`source = 'lambda'`) and its trace drain carries Vercel's spans for each request.

## Alternatives

* [**OpenTelemetry from code**](/integrations/vercel-otel.md): your own spans (database calls, calls to other services, AI calls), exported over OTLP without a drain fee.
* [**Drains you configure**](/integrations/vercel-drains.md), for example a log drain filtered to `lambda` only.

## Worth watching

| Signal | Query (log drain) |
| - | - |
| Timeouts (`maxDuration` reached) | `@raw ILIKE '%Task timed out after%'` |
| Process exits (crashes) | `@raw ILIKE '%process exited with exit status%'` |
| Functions outside your intended region | `source = 'lambda' AND executionRegion != '<region>'` |
| Errors per deployment | `level = 'error'`, grouped by `deploymentId` |

In a project using Vercel `services`, a top-level `regions` setting didn't reach the functions; they ran in `iad1`. Setting `regions` in each service's `functions` configuration fixed it. `executionRegion` is how you'd notice. An [eve](https://eve.dev) agent writes its own build output, which ignores that setting too; the lab sets the region in each eve function's configuration after the build ([`scripts/patch-eve-vercel-output.mjs`](https://github.com/bronto-community/petclinic-agent/blob/main/scripts/patch-eve-vercel-output.mjs)).

Timeouts also cost money. In the lab, streaming responses whose browser had gone away kept running until the 300-second limit and held their instance, and its memory, for the full five minutes. `supportsCancellation` didn't end them: it only passes an abort signal the code has to act on. A lower `maxDuration` for the streaming route did.

See [Ingesting Vercel Data into Bronto](/integrations/vercel.md) for the full mapping.

## References

* [Vercel Functions](https://vercel.com/docs/functions)
* [Log Drains reference](https://vercel.com/docs/drains/reference/logs)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.