All Products
Search
Document Center

Edge Security Acceleration:Routine metrics

Last Updated:Mar 27, 2025

Edge Routine provides multiple routine metrics to present information about workloads and exceptions.

View routine metrics

  1. Log on to the ESA console, and in the left-side navigation pane, choose Edge Computing > Edge Routine.

  2. In the left-side navigation pane, choose Edge Computing > Edge Routine.

  3. On the Edge Routine page, find the routine that you want to manage, and click the routine name or View Details in the Actions column. .

  4. In the Metrics tab, view data of the following routine metrics: Requests, Subrequests, CPU Time, Wall Time, and Errors.

Metric description

Requests

The Requests metric shows the number of requests processed by the routine. The metric data includes successful and failed requests.

  • Success: The routine is successfully executed without exceptions.

  • Failed: The routine fails to be executed due to reasons such as script errors, exceeded CPU time, and internal errors.

You can view the metric data on the following tabs: QPS and Requests. The QPS tab shows the number of times that the routine is successfully executed or failed to be executed per second. The Requests tab shows the total number of times that the routine is successfully executed or failed to be executed within the specified time range, such as one minute.

Subrequests

A subrequest is a request that is initiated by the routine by calling an internal fetch operation. This metric shows status codes of subrequests. The following status code ranges are available:

  • 2xx: The subrequest is successful.

  • 3xx: The subrequest is redirected.

  • 4xx: A client error occurred.

  • 5xx: A server error occurred.

CPU Time

CPU time indicates the actual CPU time slices consumed by the routine when the routine is executed. Operations that do not consume CPU time such as I/O wait are not included. The CPU time is displayed in quantiles. This way, you can evaluate the routine performance in a more accurate manner. The following quantiles are available:

  • P50: the 50th percentile of the CPU time, which is sorted in ascending order.

  • P90: the 90th percentile of the CPU time, which is sorted in ascending order.

  • P99: the 99th percentile of the CPU time, which is sorted in ascending order.

Wall Time

Wall time indicates the total time from when the routine is invoked until when the execution is complete. The wall time includes I/O wait time and execution time of the waitUnitl() function. For example, if the callback function of waitUnitl() is still being executed, the wall time continues to increase even though a response has been returned to the client. The following quantiles are available to display the wall time: P50, P90, and P99.

Errors

Edge Routine provides statistics on the number of errors of the following types. If you need more detailed error information, you can create a real-time log delivery task and view the error_message field in the Edge Routine logs.

The following error types are counted:

  • Script error

    An error, such as a script compilation error, occurred when the JavaScript code was executed.

    Error code: 1

  • Exceeded CPU time

    The actual CPU time consumed exceeds the specified threshold of the routine.

    Error code: 2

  • Exceeded memory

    The actual memory usage exceeds the threshold of the routine. The threshold is 128 MB.

    Error code: 3

  • Exceeded wall time

    The wall clock time consumed exceeds the specified threshold of the routine. The threshold is 120 seconds.

    Error code: 4

  • Client disconnection

    The client closes the connection.

    Error code: 5

  • Internal error

    An internal error occurred. To troubleshoot the error, submit a ticket to contact technical support.

    Error code: 6