Function Metrics

Find out about the metrics emitted by OCI Functions in the oci_faas metric namespace.

You can monitor the health, capacity, and performance of functions you've deployed to OCI Functions by using metrics , alarms , and notifications.

This topic describes the metrics emitted by the metric namespace oci_faas (the OCI Functions service).

Resources: functions

Overview of the OCI Functions Service Metrics

OCI Functions monitors function execution, and collects and reports metrics such as:

  • The number of times a function is invoked.
  • The length of time a function runs for.
  • The number of requests to invoke a function that failed with an error response (including the error code and error message).
  • The number of requests to invoke a function that returned a '429 Too Many Requests' error in the response (known as 'throttled function invocations').
  • The amount of memory that is allocated for concurrent function execution and for provisioned concurrency (see Monitoring Memory Usage and Availability for OCI Functions).

While frequency varies by metric, default service metrics typically have a frequency of 60 seconds (that is, at least one data point posted per minute).

Prerequisites

IAM policies: To monitor resources, you must be granted the required type of access in a policy  written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. The policy must give you access to both the monitoring services and the resources being monitored. If you try to perform an action and get a message that you don't have permission or are unauthorized, contact the administrator to find out what type of access you were granted and which compartment  you need to work in. For more information about user authorizations for monitoring, see IAM Policies.

For more information about the policy statement required to access metrics emitted by OCI Functions, see Policy Statements to Give OCI Functions Users Access to Function-Related Resources.

Available Metrics: oci_faas

The metrics listed in the following tables are automatically available for any functions you create. You do not need to enable monitoring on the resource to get these metrics.

OCI Functions metrics include the following dimensions:

APPLICATIONID
The OCID  of the application containing functions.
APPLIATIONSHAPE
The architecture of the application.
COMPARTMENTID
The OCID  of the compartment containing the application.
INVOKETYPE
The way in which the function was invoked (one of Sync or Detached). This dimension is only available in some commercial realms.
RESOURCEDISPLAYNAME
The name of the application containing the function, and the name of the function.
RESOURCEID
The OCID  of the function.
RESOURCENAME
The name of the resource to which the metric applies (application, or application and function).
RESPONSETYPE
The response when a function is invoked (one of Success, Error, or Throttled).
USERTENANCYID
The OCID  of the tenancy that invoked the function.
Metric Metric Display Name Unit Description Dimensions
AllocatedProvisionedConcurrency Functions Allocated Provisioned Concurrency megabytes Memory consumed by provisioned concurrency slots. applicationId

compartmentId

resourceId

resourceName

AllocatedTotalConcurrency Functions Allocated Concurrency megabytes Total concurrent memory allocated. applicationShape

compartmentId

resourceId

resourceName

FunctionExecutionDuration Function Duration ms Total function execution duration. Expressed in milliseconds. applicationId

invokeType

resourceDisplayName

resourceId

userTenancyId

FunctionInvocationCount Function Invocations count Total number of function invocations. applicationId

invokeType

resourceDisplayName

resourceId

userTenancyId

FunctionResponseCount

This metric is used in the following default metric charts:

Errors (with responseType = "Error")

Throttles (with responseType = "Throttled")

count Total number of function responses. applicationId

invokeType

resourceDisplayName

resourceId

userTenancyId

responseType

Additionally, when responseType = "Error", the following dimensions are available for individual functions:

ErrorCode

ErrorMessage

Using the Console