In the Function Compute console, you can query the monitoring metrics of Function Compute resources and view metric details at the regional, function, and instance levels. The MetricName parameter specifies a metric. This topic describes the monitoring metrics of Function Compute.
Resource overview metrics
Log on to the Function Compute console to view resource overview metrics in the Resource Usage Statistics section on the Overview page.
Resource overview metrics are used to monitor and measure the overall resource usage and network traffic of Function Compute in all regions or in a specific one. The following table describes the resource overview metrics. The metric values can be displayed in both daily and monthly intervals.
Category | Metric name | Unit | Description |
Overview metric | Invocations | N/A | The total number of invocations. |
vCPU Usage | vCPU-second | The vCPU resources consumed by invoked functions. The value is the vCPU capacity multiplied by the duration. | |
MemoryUsage | GB-second | The memory resources consumed by invoked functions. The value is the memory capacity multiplied by the function execution duration. | |
DiskUsage | GB-second | The disk resources consumed by invoked functions. The value is the disk size multiplied by the function execution duration. | |
InternetOut | GB | The total outbound Internet traffic generated during function executions within a specified statistical period. | |
GPU Usage | GB-second | The GPU resources consumed by invoked functions. The value is the GPU size multiplied by the duration. | |
vCPU usage | Active vCPU Usage | vCPU-second | The vCPU resources consumed by active instances. The value is the vCPU capacity multiplied by the function execution duration. |
Idle vCPU Usage | vCPU-second | The vCPU resources consumed by idle instances. The value is the vCPU capacity multiplied by the idle duration. | |
GPU usage | Active GPU Usage | GB-second | The GPU resources consumed by active instances. The value is the GPU size multiplied by the function execution duration. |
Idle GPU Usage | GB-second | The GPU resources consumed by idle instances. The value is the GPU size multiplied by the idle duration. |
Region-level metrics
Log on to the Function Compute console. In the left-side navigation pane, choose to view metrics at the regional level.
These region-specific metrics are used to monitor the resource usage of Function Compute in a region. The following table describes region-specific metrics.
Category | Metric name | Unit | Description |
Function execution | RegionTotalInvocations | N/A | The total number of invocations in a region. The values can be displayed in both one-minute and one-hour intervals. |
Number of errors | RegionServerErrors | N/A | The total number of failed invocations in a region caused by Function Compute server errors. The values can be displayed in both one-minute and one-hour intervals. Note HTTP trigger invocations with a |
RegionClientErrors | N/A | The total number of failed invocations in a region caused by Function Compute client errors, with an HTTP
For more information, see Public error codes. Note For client error requests with a | |
RegionFunctionErrors | N/A | The total number of failed invocations in a region caused by function errors. The values can be displayed in both one-minute and one-hour intervals. | |
Throttling error | RegionThrottles | N/A | The total number of failed invocations in a region caused by excessive concurrent instances, with an HTTP |
RegionResourceThrottles | N/A | The total number of failed invocations in a region caused by an excessive total number of instances, with an HTTP | |
Number of on-demand instances | RegionConcurrencyLimit | N/A | The maximum number of on-demand instances in a region within the current account. |
RegionConcurrentCount | N/A | The number of concurrently occupied on-demand instances in a region during function invocations. The values can be displayed in both one-minute and one-hour intervals. | |
Number of provisioned instances | RegionProvisionedCurrentInstance | N/A | The total number of provisioned instances that are created for all functions in a region within the current account. |
Function-level metrics
To view function-level metrics, you can log on to the Function Compute console. In the left-side navigation pane, choose . In the Function Name column, click the name of a function to view its metrics.
Function-level metrics are used to monitor and measure the usage of specific function resources from the perspective of functions and aliases. The function perspective and the alias perspective both pertain to the function dimension. The following table describes function-level metrics.
The prefix of metric names from the perspective of functions versions and function aliases is
FunctionQualifier
, for example,FunctionQualifierTotalInvocations
, which indicates the total number of function invocations.You can monitor and measure the CPU utilization, memory usage, and network traffic of a function only after you enable collection of instance-level metrics. For more information, see Instance-level metrics.
Category | Metric name | Unit | Description |
Number of invocations | FunctionTotalInvocations | N/A | The total number of invocations. The values can be displayed in both one-minute and one-hour intervals. |
FunctionProvisionInvocations | N/A | The total number of invocations on provisioned instances. The values can be displayed in both one-minute and one-hour intervals. | |
Number of HTTP status codes | FunctionHTTPStatus2xx | N/A | The number of invocations with an HTTP 2xx status code returned. The values can be displayed in one-minute, five-minute, and one-hour intervals. |
FunctionHTTPStatus3xx | N/A | The number of invocations with an HTTP 3xx status code returned. The values can be displayed in one-minute, five-minute, and one-hour intervals. | |
FunctionHTTPStatus4xx | N/A | The number of invocations with an HTTP 4xx status code returned. The values can be displayed in one-minute, five-minute, and one-hour intervals. | |
FunctionHTTPStatus5xx | N/A | The number of invocations with an HTTP 5xx status code returned. The values can be displayed in one-minute, five-minute, and one-hour intervals. | |
Number of errors | FunctionServerErrors | N/A | The total number of failed invocations of the function caused by Function Compute server errors. The values can be displayed in both one-minute and one-hour intervals. Note HTTP trigger invocations with a |
FunctionClientErrors | N/A | The total number of failed invocations of the function caused by Function Compute client errors, with an HTTP
For more information, see Public error codes. Note For client error requests with a | |
FunctionFunctionErrors | N/A | The total number of failed invocations of the function caused by function errors. The values can be displayed in both one-minute and one-hour intervals. | |
Throttling error | FunctionConcurrencyThrottles | N/A | The total number of failed invocations of the function caused by excessive concurrent instances, with an HTTP |
FunctionResourceThrottles | N/A | The total number of failed invocations of the function caused by an excessive total number of instances, with an HTTP | |
Function execution duration | FunctionAvgDuration | Millisecond | The average function execution time from start to finish. The time consumed by the platform is not included. The values can be displayed in both one-minute and one-hour intervals. |
FunctionP90Duration | Millisecond | The P90 function execution time, meaning that 90% of function executions complete within this time frame, from start to finish. The time consumed by the platform is not included. The values can be organized by specific granularities. | |
FunctionP99Duration | Millisecond | The P99 function execution time, meaning that 99% of function executions complete within this time frame, from start to finish. The time consumed by the platform is not included. The values can be organized by specific granularities. | |
FunctionMaxDuration | Millisecond | The maximum function execution time from start to finish. The time consumed by the platform is not included. The values can be displayed in both one-minute and one-hour intervals. | |
End-to-end latency | FunctionLatencyAvg | Millisecond | The average amount of time consumed by function invocations. The duration starts when a function execution request arrives at Function Compute and ends when the request leaves Function Compute. The time consumed by the platform is included. The values can be displayed in both one-minute and one-hour intervals. |
Memory usage | FunctionMemoryLimitMB | MB | The maximum memory size that can be used by the function. If the function consumes more memory than this quota, an out-of-memory (OOM) error occurs. The values can be displayed in both one-minute and one-hour intervals. |
FunctionMaxMemoryUsage | MB | The maximum amount of memory that is actually consumed during function executions. The values can be displayed in both one-minute and one-hour intervals. | |
Number of on-demand instances | FunctionOndemandInstanceQuota | N/A | The maximum number of on-demand instances for the function. If you have not configured a maximum number of on-demand instances, no values are displayed. |
FunctionOndemandActiveInstance | N/A | The number of on-demand instances that are actually occupied during function executions. | |
Number of provisioned instances | FunctionProvisionedCurrentInstance | N/A | The number of provisioned instances that are occupied during function executions. |
Asynchronous invocation processing | FunctionEnqueueCount | N/A | The number of enqueued requests when the function is asynchronously invoked. The values can be displayed in both one-minute and one-hour intervals. |
FunctionDequeueCount | N/A | The number of processed requests when the function is asynchronously invoked. The values can be displayed in both one-minute and one-hour intervals. Note If the number of processed asynchronous requests is far less than the number of enqueued asynchronous requests, a request backlog occurs. In this case, modify the configurations of provisioned instances. For more information, see Configure provisioned instances. You can also contact us for further assistance. | |
Asynchronous request latency | FunctionAsyncMessageLatencyAvg | Millisecond | The average time interval between when asynchronous requests are enqueued and when they are processed. The values can be displayed in both one-minute and one-hour intervals. |
FunctionAsyncMessageLatencyMax | Millisecond | The maximum time interval between when asynchronous requests are enqueued and when they are processed. The values can be displayed in both one-minute and one-hour intervals. | |
Events triggered during asynchronous invocations | FunctionAsyncEventExpiredDropped | N/A | The total number of requests discarded due to timeout when destination services are configured for asynchronous invocations of the function. The values can be displayed in both one-minute and one-hour intervals. |
FunctionDestinationErrors | N/A | The number of requests that fail to trigger the configured destination services during function executions. The values can be displayed in both one-minute and one-hour intervals. | |
FunctionDestinationSucceed | N/A | The number of requests that successfully trigger the configured destination services during function executions. The values can be displayed in both one-minute and one-hour intervals. | |
Asynchronous request backlog | FunctionAsyncMessagesBacklog | N/A | The total number of pending requests in the queue when the function is asynchronously invoked. The values can be displayed in both one-minute and one-hour intervals. Note If there is an asynchronous request backlog, modify the configurations of provisioned instances. For more information, see Configure provisioned instances. You can also contact us for further assistance. |
FunctionAsyncMessagesInProcess | N/A | The approximate number of asynchronous requests that are being processed. | |
Number of concurrent requests (instance-level metrics) | FunctionMaxConcurrentRequests | N/A | The maximum number of concurrently processed requests by a function instance. The values can be displayed in both one-minute and one-hour intervals. |
FunctionAvgConcurrentRequests | N/A | The average number of concurrently processed requests by a function instance. The values can be displayed in both one-minute and one-hour intervals. | |
vCPU usage (instance-level metrics) | FunctionvCPUQuotaCores | vCPU | The vCPU quota for the function. |
FunctionMaxvCPUCores | vCPU | The maximum number of vCPUs that are actually used by the function, where 1 means one vCPU. The values can be displayed in both one-minute and one-hour intervals. | |
FunctionAvgvCPUCores | vCPU | The average number of vCPUs that are actually used by the function, where 1 means one vCPU. The values can be displayed in both one-minute and one-hour intervals. | |
vCPU utilization (instance-level metrics) | FunctionMaxvCPUUtilization | % | The maximum ratio of vCPUs actually used by the function to the vCPU quota for the function. The values can be displayed in both one-minute and one-hour intervals. |
FunctionAvgvCPUUtilization | % | The average ratio of vCPUs actually used by the function to the vCPU quota for the function. The values can be displayed in both one-minute and one-hour intervals. | |
Network traffic (instance-level metrics) | FunctionRXBytesPerSec | Mbit/s | The inbound traffic of the function in a unit of time. |
FunctionTXBytesPerSec | Mbit/s | The outbound traffic of the function in a unit of time. | |
Memory usage (instance-level metrics) | FunctionMemoryLimitMB | MB | The maximum memory size that can be used by the function. Note If the function consumes more memory than this quota, an OOM error occurs. |
FunctionMaxMemoryUsageMB | MB | The maximum memory capacity that is actually consumed by function instances. The values can be displayed in both one-minute and one-hour intervals. | |
FunctionAvgMemoryUsageMB | MB | The average memory capacity that is actually consumed by function instances. The values can be displayed in both one-minute and one-hour intervals. | |
Memory utilization (instance-level metrics) | FunctionMaxMemoryUtilization | % | The maximum ratio of memory capacity actually consumed by function instances to the memory quota. The values can be displayed in both one-minute and one-hour intervals. |
FunctionAvgMemoryUtilization | % | The average ratio of memory capacity actually consumed by function instances to the memory quota. The values can be displayed in both one-minute and one-hour intervals. | |
GPU memory usage (instance-level metrics) | FunctionGPUMemoryLimitMB | MB | The GPU memory quota. |
FunctionGPUMaxMemoryUsage | MB | The amount of GPU memory used by the function. | |
GPU memory utilization (instance-level metrics) | FunctionGPUMemoryUsagePercent | % | The ratio of GPU memory used by the function to the GPU memory quota. |
GPU streaming multiprocessors (SM) utilization (instance-level metrics) | FunctionGPUSMPercent | % | The SM utilization of the function. |
GPU hardware encoder utilization (instance-level metrics) | FunctionGPUEncoderPercent | % | The hardware encoder utilization of the function. |
GPU hardware decoder utilization (instance-level metrics) | FunctionGPUDecoderPercent | % | The hardware decoder utilization of the function. |
More information
For information about how to call the CloudMonitor API to view monitoring details, see Monitoring data.