Function observability
Inspect function invocations, cold starts, duration, and memory in Invocations.
An invocation is one function wake. A warm instance can serve several requests at once, so one invocation can cover more than one request. See Concurrency for how that works.
Use Observability charts for trends, the request details in Logs for one request, and Invocations for the wake behind them.
Invocations
Invocations lists recent wakes for the project, with:
- Kind (function or middleware) and Route
- Reqs: requests served on the wake
- Cold: whether the wake started a new runtime process
- Duration, Compute, and Init
- Billed duration
- Memory and Instance
Select an invocation to open:
- Overview: summary fields, configured and maximum memory, the deployment, and a waterfall of the requests served on the wake
- Trace: the wake's lifecycle with a bar for each request
Open in Logs lists the requests for that invocation. In Logs, the
search invocationId:<id> does the same.
Duration fields
Each duration measures something different, so check which one you're reading:
| Field | Measures |
|---|---|
| Duration | Wall time for the whole wake |
| Compute | Your code's execution time, through the end of each response body |
| Post-response | Work after a response finished, such as waitUntil |
| Billed duration | The duration the wake is billed for. See Pricing. |
| Init | Startup time on a cold wake |
A request's Trace shows where time went inside that request. Cold start and billed duration belong to the wake, so they appear on the request details and here, not as Trace spans.
Cold and warm starts
A cold wake starts a new runtime process. A warm wake reuses one that's already running. The Function Starts chart on Observability splits invocations into Cold and Warm. To reduce cold-start cost, see Instance lifecycle.
Errors and timeouts
Failed requests appear with 5xx statuses in Logs and in the Functions chart. Open the request's log lines and Trace to find the cause. Timeouts follow your function's maximum duration. See Function configuration.