Function Monitoring
After creating a function and trigger, you can monitor the real-time invocation and running statuses of the function.
Viewing Function Metrics
FunctionGraph differentiates the metrics of a function by version, allowing you to query the metrics of a specific function version.
Procedure
- Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
- Click the name of the desired function to go to the function details page.
- Select a version or alias, and click the Monitoring tab.
- On the Monitoring tab page, select an interval (such as 5 minutes, 15 minutes, and 1 hour), and check the running status of the function.
FunctionGraph presents the following metrics: invocation count, invocation errors, invocation duration (including the maximum, average, and minimum invocation durations), and throttled invocations.
Function metrics
Table 1 describes the function metrics.
| Metric | Unit | Description |
|---|---|---|
| Invocations | Count | Total number of invocation requests, including invocation errors and throttled invocations. In asynchronous invocation mode, the count starts only when a function is executed in response to a request. |
| Duration | ms | Maximum Duration: the maximum duration a function is executed within a period. Minimum Duration: the minimum duration a function is executed within a period. Average Duration: the average duration a function is executed within a period. |
| Errors | Count | Number of times that your functions failed with error code 200 being returned. Errors caused by function syntax or execution are also included. |
| Throttles | Count | Number of times that FunctionGraph throttles your functions due to the resource limit. |
Viewing Monitoring Graphs
Create an alarm rule for a function to report metrics to Cloud Eye so that you can view monitoring graphs and alarm messages on the Cloud Eye console.
- Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
- Click the name of the desired function to go to the function details page.
- Select a version or alias, and click the Monitoring tab.
- Click Create Alarm Rule.
- In the Create Alarm Rule dialog box, set alarm parameters and click Next, as shown in Figure 1.
- Set a rule name and click Create.
Function Metrics
Table 2 lists the function metrics that can be monitored by Cloud Eye.
| Metric | Display Name | Description | Unit | Upper Limit | Lower Limit | Recommended Threshold | Value Type | Dimension |
|---|---|---|---|---|---|---|---|---|
| count | Invocations | Number of function invocations | Count | - | 0 | - | int | package-functionname |
| failcount | Errors | Number of invocation errors | Count | - | 0 | - | int | package-functionname |
| rejectcount | Throttles | Number of function throttles | Count | - | 0 | - | int | package-functionname |
| duration | Average Duration | Average duration of function invocation | ms | - | 0 | - | int | package-functionname |
| maxDuration | Maximum Duration | Maximum duration of function invocation | ms | - | 0 | - | int | package-functionname |
| minDuration | Minimum Duration | Minimum duration of function invocation | ms | - | 0 | - | int | package-functionname |
Querying Logs
After querying the logs of a function version within a specified date range, you can download the logs for further analysis.
- Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
- Click the name of the desired function to go to the function details page.
- Select a version or alias, and click the Logs tab.
- On the Logs tab page, set the search criteria.
- You can query logs by time and keyword.
- FunctionGraph allows you to query logs of the last 5 minutes, 30 minutes, 1 hour, or a custom time range.
- You can query the logs of a specific function version.
- Click
to search for logs.
- A log record includes an instance, a digest, and a context.
- In the Operation column, click View Context to view the detailed running information of a log.
- If you select Show error logs only, only error logs are displayed.
- Enable LTS to facilitate function log management.
Downloading Logs
- Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
- Click the name of the desired function to go to the function details page.
- Click the Logs tab.
- Select a version and time range, and click Download Log.
A maximum of 5000 logs can be downloaded at a time. When querying logs, select a proper time range to avoid the loss of logs.
Last Article: Version and Alias Management
Next Article: RI Management



Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.