Skip to content

Latest commit

 

History

History
511 lines (374 loc) · 25 KB

faas-metrics.md

File metadata and controls

511 lines (374 loc) · 25 KB

Semantic Conventions for FaaS Metrics

Status: Experimental

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.

Metric Instruments

The following metric instruments describe FaaS operations.

FaaS Instance

The following metrics are recorded by the FaaS instance.

Metric: faas.invoke_duration

This metric is recommended.

This metric SHOULD be specified with ExplicitBucketBoundaries 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
faas.invoke_duration Histogram s Measures the duration of the function's logic execution Experimental
Attribute Type Description Examples Requirement Level Stability
faas.trigger string Type of the trigger which caused this function invocation. datasource; http; pubsub Recommended Experimental

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.

Value Description Stability
datasource A response to some data source operation such as a database or filesystem read/write Experimental
http To provide an answer to an inbound HTTP request Experimental
other If none of the others apply Experimental
pubsub A function is set to be executed when messages are sent to a messaging system Experimental
timer A function is scheduled to be executed regularly Experimental

Metric: faas.init_duration

This metric is recommended.

This metric SHOULD be specified with ExplicitBucketBoundaries 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
faas.init_duration Histogram s Measures the duration of the function's initialization, such as a cold start Experimental
Attribute Type Description Examples Requirement Level Stability
faas.trigger string Type of the trigger which caused this function invocation. datasource; http; pubsub Recommended Experimental

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.

Value Description Stability
datasource A response to some data source operation such as a database or filesystem read/write Experimental
http To provide an answer to an inbound HTTP request Experimental
other If none of the others apply Experimental
pubsub A function is set to be executed when messages are sent to a messaging system Experimental
timer A function is scheduled to be executed regularly Experimental

Metric: faas.coldstarts

This metric is recommended.

Name Instrument Type Unit (UCUM) Description Stability
faas.coldstarts Counter {coldstart} Number of invocation cold starts Experimental
Attribute Type Description Examples Requirement Level Stability
faas.trigger string Type of the trigger which caused this function invocation. datasource; http; pubsub Recommended Experimental

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.

Value Description Stability
datasource A response to some data source operation such as a database or filesystem read/write Experimental
http To provide an answer to an inbound HTTP request Experimental
other If none of the others apply Experimental
pubsub A function is set to be executed when messages are sent to a messaging system Experimental
timer A function is scheduled to be executed regularly Experimental

Metric: faas.errors

This metric is recommended.

Name Instrument Type Unit (UCUM) Description Stability
faas.errors Counter {error} Number of invocation errors Experimental
Attribute Type Description Examples Requirement Level Stability
faas.trigger string Type of the trigger which caused this function invocation. datasource; http; pubsub Recommended Experimental

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.

Value Description Stability
datasource A response to some data source operation such as a database or filesystem read/write Experimental
http To provide an answer to an inbound HTTP request Experimental
other If none of the others apply Experimental
pubsub A function is set to be executed when messages are sent to a messaging system Experimental
timer A function is scheduled to be executed regularly Experimental

Metric: faas.invocations

This metric is recommended.

Name Instrument Type Unit (UCUM) Description Stability
faas.invocations Counter {invocation} Number of successful invocations Experimental
Attribute Type Description Examples Requirement Level Stability
faas.trigger string Type of the trigger which caused this function invocation. datasource; http; pubsub Recommended Experimental

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.

Value Description Stability
datasource A response to some data source operation such as a database or filesystem read/write Experimental
http To provide an answer to an inbound HTTP request Experimental
other If none of the others apply Experimental
pubsub A function is set to be executed when messages are sent to a messaging system Experimental
timer A function is scheduled to be executed regularly Experimental

Metric: faas.timeouts

This metric is recommended.

Name Instrument Type Unit (UCUM) Description Stability
faas.timeouts Counter {timeout} Number of invocation timeouts Experimental
Attribute Type Description Examples Requirement Level Stability
faas.trigger string Type of the trigger which caused this function invocation. datasource; http; pubsub Recommended Experimental

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.

Value Description Stability
datasource A response to some data source operation such as a database or filesystem read/write Experimental
http To provide an answer to an inbound HTTP request Experimental
other If none of the others apply Experimental
pubsub A function is set to be executed when messages are sent to a messaging system Experimental
timer A function is scheduled to be executed regularly Experimental

Metric: faas.mem_usage

This metric is recommended.

Name Instrument Type Unit (UCUM) Description Stability
faas.mem_usage Histogram By Distribution of max memory usage per invocation Experimental
Attribute Type Description Examples Requirement Level Stability
faas.trigger string Type of the trigger which caused this function invocation. datasource; http; pubsub Recommended Experimental

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.

Value Description Stability
datasource A response to some data source operation such as a database or filesystem read/write Experimental
http To provide an answer to an inbound HTTP request Experimental
other If none of the others apply Experimental
pubsub A function is set to be executed when messages are sent to a messaging system Experimental
timer A function is scheduled to be executed regularly Experimental

Metric: faas.cpu_usage

This metric is recommended.

This metric SHOULD be specified with ExplicitBucketBoundaries 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
faas.cpu_usage Histogram s Distribution of CPU usage per invocation Experimental
Attribute Type Description Examples Requirement Level Stability
faas.trigger string Type of the trigger which caused this function invocation. datasource; http; pubsub Recommended Experimental

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.

Value Description Stability
datasource A response to some data source operation such as a database or filesystem read/write Experimental
http To provide an answer to an inbound HTTP request Experimental
other If none of the others apply Experimental
pubsub A function is set to be executed when messages are sent to a messaging system Experimental
timer A function is scheduled to be executed regularly Experimental

Metric: faas.net_io

This metric is recommended.

Name Instrument Type Unit (UCUM) Description Stability
faas.net_io Histogram By Distribution of net I/O usage per invocation Experimental
Attribute Type Description Examples Requirement Level Stability
faas.trigger string Type of the trigger which caused this function invocation. datasource; http; pubsub Recommended Experimental

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.

Value Description Stability
datasource A response to some data source operation such as a database or filesystem read/write Experimental
http To provide an answer to an inbound HTTP request Experimental
other If none of the others apply Experimental
pubsub A function is set to be executed when messages are sent to a messaging system Experimental
timer A function is scheduled to be executed regularly Experimental

References

Metric References

Below are links to documentation regarding metrics that are available with different FaaS providers. This list is not exhaustive.