Status: Development
This document defines how to describe an instance of a function that runs without provisioning or managing of servers (also known as serverless functions or Function as a Service (FaaS)) with metrics.
The conventions described in this section are FaaS (function as a service) specific. When FaaS operations occur, metric events about those operations will be generated and reported to provide insights into the operations. By adding FaaS attributes to metric events it allows for finely tuned filtering.
The following metric instruments describe FaaS operations.
The following metrics are recorded by the FaaS instance.
This metric is recommended.
This metric SHOULD be specified with ExplicitBucketBoundaries advisory parameter of [ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
|---|---|---|---|---|---|
faas.invoke_duration |
Histogram | s |
Measures the duration of the function's logic execution. |
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
faas.trigger |
Recommended |
string | Type of the trigger which caused this function invocation. | datasource; http; pubsub |
faas.trigger has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
This metric is recommended.
This metric SHOULD be specified with ExplicitBucketBoundaries advisory parameter of [ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
|---|---|---|---|---|---|
faas.init_duration |
Histogram | s |
Measures the duration of the function's initialization, such as a cold start. |
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
faas.trigger |
Recommended |
string | Type of the trigger which caused this function invocation. | datasource; http; pubsub |
faas.trigger has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
This metric is recommended.
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
|---|---|---|---|---|---|
faas.coldstarts |
Counter | {coldstart} |
Number of invocation cold starts. |
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
faas.trigger |
Recommended |
string | Type of the trigger which caused this function invocation. | datasource; http; pubsub |
faas.trigger has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
This metric is recommended.
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
|---|---|---|---|---|---|
faas.errors |
Counter | {error} |
Number of invocation errors. |
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
faas.trigger |
Recommended |
string | Type of the trigger which caused this function invocation. | datasource; http; pubsub |
faas.trigger has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
This metric is recommended.
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
|---|---|---|---|---|---|
faas.invocations |
Counter | {invocation} |
Number of successful invocations. |
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
faas.trigger |
Recommended |
string | Type of the trigger which caused this function invocation. | datasource; http; pubsub |
faas.trigger has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
This metric is recommended.
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
|---|---|---|---|---|---|
faas.timeouts |
Counter | {timeout} |
Number of invocation timeouts. |
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
faas.trigger |
Recommended |
string | Type of the trigger which caused this function invocation. | datasource; http; pubsub |
faas.trigger has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
This metric is recommended.
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
|---|---|---|---|---|---|
faas.mem_usage |
Histogram | By |
Distribution of max memory usage per invocation. |
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
faas.trigger |
Recommended |
string | Type of the trigger which caused this function invocation. | datasource; http; pubsub |
faas.trigger has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
This metric is recommended.
This metric SHOULD be specified with ExplicitBucketBoundaries advisory parameter of [ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
|---|---|---|---|---|---|
faas.cpu_usage |
Histogram | s |
Distribution of CPU usage per invocation. |
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
faas.trigger |
Recommended |
string | Type of the trigger which caused this function invocation. | datasource; http; pubsub |
faas.trigger has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
This metric is recommended.
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
|---|---|---|---|---|---|
faas.net_io |
Histogram | By |
Distribution of net I/O usage per invocation. |
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
faas.trigger |
Recommended |
string | Type of the trigger which caused this function invocation. | datasource; http; pubsub |
faas.trigger has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Below are links to documentation regarding metrics that are available with different FaaS providers. This list is not exhaustive.