You can query metrics of Function Compute in the Function Compute console. The metrics include resource overview metrics and metrics specific to regions, services, and functions. The MetricName parameter specifies a metric. This topic describes the names and descriptions of monitoring metrics of Function Compute.

Resource overview metrics

You can log on to the Function Compute console and view the resource overview metrics in the Resource Usage Statistics section on the Overview page.

The 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 region. The following table describes the metrics. All metrics are summed at a one-day or one-month granularity.
CategoryMetric nameUnitDescription
OverviewInvocationsCountThe total number of function invocation requests.
vCPU UsagevCPU-secondsThe vCPU resources consumed by invoked functions. The value is the vCPU capacity multiplied by function execution duration.
Memory UsageGB-secondsThe memory resources consumed by invoked functions. The value is the memory capacity multiplied by function execution duration.
Disk UsageGB-secondsThe disk resources consumed by invoked functions. The value is the disk capacity multiplied by function execution duration.
Outbound Internet TrafficGBThe total outbound Internet traffic that is generated during function execution within a specified statistical period.
GPU UsageGB-secondsThe GPU resources consumed by invoked functions. The value is the GPU capacity multiplied by function execution duration.
vCPU UsageActive vCPU UsagevCPU-secondsThe active vCPU resources consumed by invoked functions. The value is the vCPU capacity multiplied by function execution duration.
Idle vCPU UsagevCPU-secondsThe idle vCPU resources consumed by invoked functions. The value is the vCPU capacity multiplied by instance idle duration.
Outbound Internet TrafficData Transfer Within FunctionsGBThe traffic that is generated when functions access the Internet.
Response Traffic of Function RequestsGBThe traffic that is generated when Function Compute returns responses over the Internet after functions are executed.
CDN Back-to-Origin TrafficGBThe CDN back-to-origin traffic that is generated when Function Compute serves as the CDN origin.

Region-specific metrics

Log on to the Function Compute console. In the left-side navigation pane, choose Advanced Features > Monitoring Dashboard. On the page that appears, you can view the region-specific metrics.

The region-specific metrics are used to monitor and measure the resource usage of Function Compute in a region. The following table describes the region-specific metrics.

CategoryMetric nameUnitDescription
Function executionInvocationsCountThe total number of requests to invoke functions in a region. The statistics are collected every minute or every hour.
Number of errorsServer ErrorsCountThe total number of requests for invocations in a region that failed to be executed due to Function Compute server errors. The statistics are collected every minute or every hour.
Note Requests for successful invocations of functions configured with HTTP triggers and for which an HTTP 5xx status code is returned are not counted.
Client ErrorsCountThe total number of requests that are not executed or failed to be executed due to client errors of Function Compute and for which an HTTP 4xx status code is returned. The statistics are collected every minute or every hour. The following items list some HTTP 4xx status codes:
  • 400: Invalid parameter.
  • 403: Invalid permissions.
  • 404: Resource not found.
  • 412: A precondition failed. For example, the function instance fails to start in a custom runtime.
  • 499: The client closed the connection before the request is answered.

For more information, see Public error codes.

Note If the requests for which 412 and 499 are reported are executed and function logs are generated and billed, you can view the logs of these client error requests in Request List. For more information, see View function invocation logs.
Function ErrorsCountThe total number of requests for invocations in a region that failed to be executed due to function errors. The statistics are collected every minute or every hour.
Errors due to throttlingMaximum Concurrent Instances ExceededCountThe total number of requests for invocations in a region that failed to be executed due to excessive concurrent instances and for which the HTTP 429 status code is returned. The statistics are collected every minute or every hour.
Maximum Instances ExceededCountThe total number of requests for invocations in a region that failed to be executed due to excessive instances and for which the HTTP 503 status code is returned. The statistics are collected every minute or every hour.
Number of on-demand instancesUpper LimitCountThe maximum number of on-demand instances that can be concurrently occupied in a region within the current account. Default value: 300.
On-demand InstancesCountThe number of on-demand instances that are concurrently occupied when you invoke functions in a region. The statistics are collected every minute or every hour.
Number of provisioned instancesProvisioned InstancesCountThe total number of provisioned instances that are created for all functions in a region within the current account.

Service-specific metrics

Log on to the Function Compute console. In the left-side navigation pane, choose Advanced Features > Monitoring Dashboard. On the page that appears, click the name of the service whose metrics you want to view in the Service Name column.

The service-specific metrics are used to monitor and measure the resource usage of a service from the perspective of service, version, and alias. The following table describes the service-specific metrics.
Note The prefix of the metric name from the service version perspective or service alias perspective is ServiceQualifier. For example, the ServiceQualifierTotalInvocations metric specifies the total number of invocations.
CategoryMetric nameUnitDescription
Function executionTotal InvocationsCountThe total number of requests to invoke functions in a service. The statistics are collected every minute or every hour.
Number of errorsServer ErrorsCountThe total number of requests for invocations of functions in a service that failed to be executed due to Function Compute server errors. The statistics are collected every minute or every hour.
Note Requests for successful invocations of functions configured with HTTP triggers and for which an HTTP 5xx status code is returned are not counted.
Client ErrorsCountThe total number of requests that are not executed or failed to be executed due to client errors of Function Compute and for which an HTTP 4xx status code is returned. The statistics are collected every minute or every hour. The following items list some HTTP 4xx status codes:
  • 400: Invalid parameter.
  • 403: Invalid permissions.
  • 404: Resource not found.
  • 412: A precondition failed. For example, the function instance fails to start in a custom runtime.
  • 499: The client closed the connection before the request is answered.

For more information, see Public error codes.

Note If the requests for which 412 and 499 are reported are executed and function logs are generated and billed, you can view the logs of these client error requests in Request List. For more information, see View function invocation logs.
Function ErrorsCountThe total number of requests for invocations in a service that failed to be executed due to function errors. The statistics are collected every minute or every hour.
Errors due to throttlingMaximum Concurrent Instances ExceededCountThe total number of requests for invocations in a service that failed to be executed due to excessive concurrent instances and for which the HTTP 429 status code is returned. The statistics are collected every minute or every hour.
Maximum Instances ExceededCountThe total number of requests for invocations in a service that failed to be executed due to excessive instances and for which the HTTP 503 status code is returned. The statistics are collected every minute or every hour.
Number of on-demand instances in a regionLimitCountThe maximum number of on-demand instances that can be concurrently occupied in a region within the current account. Default value: 300.
Used On-demand Instances in the RegionCountThe number of on-demand instances that are concurrently occupied when the functions in a region are invoked. The statistics are collected every minute or every hour.
Number of provisioned instancesProvisioned InstancesCountThe total number of provisioned instances for all functions in the current service.
Asynchronous invocationsAsynchronous Requests EnqueuedCountThe number of enqueued requests for asynchronous invocations in the service.Function Compute If the number of enqueued requests is much greater than the number of processed requests, a message backlog occurs. In this case, you can change the upper limit of provisioned instances for auto scaling or contact Function Compute engineers. For more information about provisioned instances for auto scaling, see Configure provisioned instances and auto scaling rules.
Asynchronous Requests ProcessedCountThe number of processed requests for asynchronous invocations in the service.Function Compute If the number of enqueued requests is much greater than the number of processed requests, a message backlog occurs. In this case, you can change the upper limit of provisioned instances for auto scaling or contact Function Compute engineers. For more information about provisioned instances for auto scaling, see Configure provisioned instances and auto scaling rules.
Processing latency of an asynchronous messageAverage Latency of Asynchronous RequestsMillisecondThe average interval of time between asynchronous requests are enqueued and processed. If the average latency is excessively high, a message backlog occurs. In this case, you can change the upper limit of provisioned instances for auto scaling or contact Function Compute engineers. For more information about provisioned instances for auto scaling, see Configure provisioned instances and auto scaling rules.

Function-specific metrics

Log on to the Function Compute console. In the left-side navigation pane, choose Advanced Features > Monitoring Dashboard. On the page that appears, click the name of the desired service in the Service Name column. On the Service-level Monitoring page, click the name of the function whose metrics that you want to view in the Function Name column.

The function-specific metrics are used to monitor and measure the resource usage of functions from the function perspective, the perspective of all functions in a service version, and the perspective of all functions in a service alias. The function perspective, function perspective of a service version, and function perspective of a service alias all belong to the function dimension. The following table describes the function-specific metrics.
Note
  • The prefix of the metric name from the perspective of all functions in a service version or the perspective of all functions in a service alias is FunctionQualifier, such as FunctionQualifierTotalInvocations for the total number of requests to invoke the functions.
  • You can monitor and measure the function-specific CPU utilization, memory usage, and network traffic only after collection of instance-level metrics is enabled. For more information about instance-level metrics, see Instance-level metrics.
CategoryMetric nameUnitDescription
Number of requestsTotal InvocationsCountThe total number of requests to invoke a function by provisioned and on-demand instances. The statistics are collected every minute or every hour.
Provisioned Instance-based InvocationsCountThe total number of requests to invoke a function by provisioned instances. The statistics are collected every minute or every hour.
Number of errorsServer ErrorsCountThe total number of requests for invocations of a function that failed to be executed due to server errors.Function Compute The statistics are collected every minute or every hour.
Note Requests for successful invocations of functions configured with HTTP triggers and for which an HTTP 5xx status code is returned are not counted.
Client ErrorsCountThe total number of requests that are not executed or failed to be executed due to client errors of Function Compute and for which an HTTP 4xx status code is returned. The statistics are collected every minute or every hour. The following items list some HTTP 4xx status codes:
  • 400: Invalid parameter.
  • 403: Invalid permissions.
  • 404: Resource not found.
  • 412: A precondition failed. For example, the function instance fails to start in a custom runtime.
  • 499: The client closed the connection before the request is answered.

For more information, see Public error codes.

Note If the requests for which 412 and 499 are reported are executed and function logs are generated and billed, you can view the logs of these client error requests in Request List. For more information, see View function invocation logs.
Function ErrorsCountThe total number of requests for invocations of a function that failed to be executed due to function errors. The statistics are collected every minute or every hour.
Errors due to throttlingMaximum Concurrent Instances ExceededCountThe total number of requests for invocations of a function that failed to be executed due to excessive concurrent instances and for which the HTTP 429 status code is returned. The statistics are collected every minute or every hour.
Maximum Instances ExceededCountThe total number of requests for invocations of a function that failed to be executed due to excessive instances and for which the HTTP 503 status code is returned. The statistics are collected every minute or every hour.
End-to-end latencyAverageMillisecondThe average amount of time consumed when a function is invoked from the time when a function execution request arrives at Function Compute to the time when the request leaves Function Compute, including the amount of time consumed by the platform. The average amount of time is calculated every minute or every hour.
Maximum LatencyMillisecondThe maximum amount of time consumed when a function is invoked from the time when a function execution request arrives at Function Compute to the time when the request leaves Function Compute, including the amount of time consumed by the platform. The statistics are collected every minute or every hour.
Number of requests concurrently processed by a single instanceConcurrent RequestsCountThe number of requests that are concurrently processed by an instance when a function is invoked. The statistics are collected every minute or every hour.
Note If you do not configure a single instance to concurrently process multiple requests for the function, a single instance concurrently processes a single request by default. To display this metric, enable the collection of instance-level metrics. For more information, see A single instance that concurrently processes multiple requests and Instance-level metrics.
Used On-demand InstancesCountThe number of on-demand instances that are occupied to execute a function when the function is invoked.
Number of provisioned instances for a functionNumber of Provisioned InstancesCountThe number of provisioned instances that are occupied to execute a function when the function is invoked.
vCPU usagevCPU Quota%The vCPU quota of the function when the function is invoked. The statistics are collected every minute or every hour. You can flexibly configure the vCPU and memory specifications. The vCPU-to-memory ratio (vCPU:GB) must be from 1:1 to 1:4.
vCPU Usage%The vCPU utilization of a function when a function is invoked. This metric indicates the number of used vCPUs. For example, 100% represents one vCPU. The total value for all instances of the function is calculated every minute or every hour.
Memory usageMemory QuotaMBThe maximum size of the memory that can be used by a function when the function is invoked. If the function consumes more memory than this upper limit, an out-of-memory (OOM) error occurs. The maximum value for all instances of the function is calculated every minute or every hour.
Used MemoryMBThe size of the memory consumed to execute a function when the function is invoked. This metric indicates the memory actually consumed by the function. The maximum value for all instances of the function is calculated every minute or every hour.
Network trafficInbound TraffickbpsThe inbound traffic that is generated during function execution within a unit time when a function is invoked. The total value for all instances of the function is calculated every minute or every hour.
Outbound TraffickbpsThe outbound traffic that is generated during function execution within a unit time when a function is invoked. The total value for all instances of the function is calculated every minute or every hour.
Asynchronous Invocation Processing CasesAsynchronous Requests EnqueuedCountThe number of enqueued requests when a function is asynchronously invoked. The statistics are collected every minute or every hour.
Asynchronous Requests ProcessedCountThe number of processed requests when a function is asynchronously invoked. The statistics are collected every minute or every hour.
Note If the number of enqueued requests is much greater than the number of processed requests, a message backlog occurs. In this case, you can change the upper limit of provisioned instances for auto scaling or contact Function Compute engineers. For more information about provisioned instances for auto scaling, see Configure provisioned instances and auto scaling rules.
Processing latency of an asynchronous messageAverageMillisecondThe interval of time between asynchronous requests are enqueued and processed. The average value is calculated every minute or every hour.
Maximum DurationMillisecondThe interval of time between asynchronous requests are enqueued and processed. The statistics are collected every minute or every hour.
Events triggered during asynchronous invocationsDiscarded upon TimeoutCountThe total number of requests that are dropped when a destination is configured for asynchronous invocations of a function. The statistics are collected every minute or every hour.
Destination Trigger FailedCountThe number of requests that fail to trigger the destination during function execution when a destination is configured for asynchronous invocation of a function. The statistics are collected every minute or every hour.
Destination TriggeredCountThe number of requests that trigger the destination during function execution when a destination is configured for asynchronous invocation of a function. The statistics are collected every minute or every hour.
Resource usageUsageMB × msThe resources consumed by all functions in a service of a specified version or alias. The value is the memory capacity multiplied by the function execution duration. The statistics are collected every minute or every hour.
Request backlogsBacklogsCountThe total number of requests that are queued and being processed. The statistics are collected every minute or every hour.
Note If the value is greater than 0, you can change the upper limit of provisioned instances for auto scaling or contact Function Compute engineers. For more information about provisioned instances for auto scaling, see Configure provisioned instances and auto scaling rules.

References

For more information about how to call CloudMonitor API operations to view monitoring details, see Metrics data.