All Products
Search
Document Center

CDN:EdgeScript monitoring

Last Updated:Jun 21, 2026

Monitoring EdgeScript execution helps you verify the correctness and optimize the performance of your custom logic.

Note

For more information about EdgeScript, see EdgeScript overview.

How it works

On the EdgeScript monitoring page, you can query the execution status of your scripts. The page provides data from the last three months, and you can query up to one month of data at a time.

Monitoring item

Description

Status

The execution status indicates what happens when a client request reaches a point of presence (POP) for a domain name where EdgeScript is configured. Each request results in one of the following four statuses:

  • NonExecution

    The script was not executed. For example, if your script is configured to run at the foot stage, which is after other CDN configurations are processed, a request might be terminated by another feature such as anti-hotlinking or a redirect. In this case, the script at the foot stage does not run.

  • ExecutedAndHit

    The script was executed, matched the code logic, and terminated normally by returning return true.

  • ExecutedButNotHit

    The script was executed but did not match the code logic. This means the script did not terminate by returning return true. For example, your code may not have a return true statement, or it may explicitly return return false.

  • Exception

    Indicates that an exception, such as a logic error or a timeout, occurred during script execution. Common causes include incorrect parameters or an execution time that exceeds 50 ms. You can add the _es_dbg configuration in the Extensions section of your EdgeScript configuration and use the debugging tool in the upper-right corner of the EdgeScript page to view debugging information and locate the error. For information about how to add the _es_dbg configuration, see Use the console to configure EdgeScript.

    Note

    If you set _es_dbg to a specific value in the Alibaba Cloud CDN console, client requests must include the _es_dbg parameter with the matching value to enable debugging.

Exception

Indicates that an exception occurred during script execution, returning one of the following error codes:

  • 400: The script contains an unsupported function.

  • 401: Incorrect number of arguments for a function.

  • 402: An argument is not of the expected string type.

  • 403: An argument is not of the expected numeric type.

  • 404: An argument is not of the expected dictionary type.

  • 405: An argument is not of the expected boolean type.

  • 406: An argument is not of the expected function type.

  • 407: Rule execution timed out.

  • 408: Maximum number of calls exceeded.

  • 409: Maximum number of loops exceeded.

  • 410: Maximum number of loops exceeded.

  • 499: Unknown type error.

Procedure

  1. Log on to the CDN console.

  2. In the left-side navigation pane, choose Monitoring & Usage Analytics > EdgeScript.

  3. On the EdgeScript page, click the Status or Exception tab.

  4. Select a domain name and a time range, and then click Search.

    The page displays data for the four statuses or the exception error codes, depending on your selections.

API reference

API

Description

DescribeEsExecuteData

Queries the execution status of EdgeScript rules.

DescribeEsExceptionData

Queries exceptions during EdgeScript rule execution.