Functions metrics can help you diagnose issues and understand your workloads by showing performance and usage data for your Functions.
Functions metrics aggregate request data for an individual Pages project. To view your Functions metrics:
- Log in to the and select your account.
- In Account Home, select Workers & Pages > in Overview, select your Pages project.
- In your Pages project, select Functions Metrics.
There are three metrics that can help you understand the health of your Function:
- Requests success.
- Requests errors.
- Invocation Statuses.
In Functions metrics, you can see historical request counts broken down into total requests, successful requests and errored requests. Information on subrequests is available by selecting Subrequests.
- Total: All incoming requests registered by a Function. Requests blocked by or other security features will not count.
- Success: Requests that returned a
- Errors: Requests that returned a
Script Threw Exception,
Exceeded Resources, or
- Subrequests: Requests triggered by calling
fetchfrom within a Function. When your Function fetches a static asset, it will count as a subrequest. A subrequest that throws an uncaught error will not be counted.
Request traffic data may display a drop off near the last few minutes displayed in the graph for time ranges less than six hours. This does not reflect a drop in traffic, but a slight delay in aggregation and metrics delivery.
Function invocation statuses indicate whether a Function executed successfully or failed to generate a response in the Workers runtime. Invocation statuses differ from HTTP status codes. In some cases, a Function invocation succeeds but does not generate a successful HTTP status because of another error encountered outside of the Workers runtime. Some invocation statuses result in a Workers error code being returned to the client.
|Workers error code
|Graph QL field
|Worker script executed successfully
|HTTP client disconnected before the request completed
|Script threw exception
|Worker script exceeded runtime limits
|Workers runtime encountered an error
- The Exceeded Resources status may appear when the Worker exceeds a . The most common cause is excessive CPU time, but is also caused by a script exceeding startup time or free tier limits.
- The Internal Error status may appear when the Workers runtime fails to process a request due to an internal failure in our system. These errors are not caused by any issue with the Function code nor any resource limit. While requests with Internal Error status are rare, some may appear during normal operation. These requests are not counted towards usage for billing purposes. If you notice an elevated rate of requests with Internal Error status, review .
CPU time per execution
Duration per execution
The Duration chart underneath Median CPU time in the Functions metrics dashboard shows historical per Function execution. The data is broken down into relevant quantiles, similar to the CPU time chart.
Understanding duration on your Function is useful when you are intending to do a significant amount of computation on the Function itself. This is because you may have to use the Standard or Unbound usage model which allows up to 30 seconds of CPU time.
Functions metrics can be inspected for up to three months in the past in maximum increments of one week. The Functions metrics dashboard in your Pages project includes the charts and information described above.