|
1 | 1 | # General
|
2 | 2 |
|
3 |
| -The conventions described in this section are FaaS (function as a service) specific. When FaaS operations occur, |
4 |
| -metric events about those operations will be generated and reported to provide insight into the |
5 |
| -operations. By adding FaaS labels to metric events it allows for finely tuned filtering. |
| 3 | +The conventions described in this section aim both Functions running as a service (FaaS) and on-premise setups. When Functions are operated, metric events about those operations will be generated and reported to provide insight into the |
| 4 | +operations. By adding Functions dedicated labels to metric events it allows for finely tuned filtering. |
6 | 5 |
|
7 |
| -**Disclaimer:** These are initial FaaS metric instruments and labels but more may be added in the future. |
| 6 | +**Disclaimer:** These are initial Function metric instruments and labels but more may be added in the future. Not all instruments |
| 7 | +apply to all environments. |
8 | 8 |
|
9 | 9 | ## Metric Instruments
|
10 | 10 |
|
11 |
| -The following metric instruments MUST be used to describe FaaS operations. They MUST be of the specified |
| 11 | +The following metric instruments MUST be used to describe Function operations. They MUST be of the specified |
12 | 12 | type and units.
|
13 | 13 |
|
14 |
| -### FaaS Invocations |
| 14 | +### Function Invocations |
15 | 15 |
|
16 |
| -Below is a table of FaaS invocation metric instruments. |
| 16 | +Below is a table of Function invocation metric instruments. |
17 | 17 |
|
18 | 18 | | Name | Instrument | Units | Description |
|
19 |
| -|------|------------|----|--|-------------| |
20 |
| -| `faas.invoke_duration` | ValueRecorder | milliseconds | Measures the duration of the invocation | |
21 |
| -| `faas.init_duration` | ValueRecorder | milliseconds | Measures the duration of the function's initialization, such as a cold start | |
22 |
| -| `faas.coldstarts` | Counter | number of cold starts | Number of invocation cold starts. | |
23 |
| -| `faas.errors` | Counter | number of errors | Number of invocation errors. | |
24 |
| -| `faas.executions` | counter | number of invocations | number of successful invocations. | |
25 |
| -| `faas.timeouts` | counter | number of timeouts | number of invocation timeouts. | |
| 19 | +|------|------------|-------|-------------| |
| 20 | +| `func.invoke_duration` | ValueRecorder | milliseconds | Measures the duration of the invocation where real work is being done. | |
| 21 | +| `func.init_duration` | ValueRecorder | milliseconds | Measures the duration of the function's initialization, such as a cold start | |
| 22 | +| `func.coldstarts` | Counter | number of cold starts | Number of invocation cold starts. | |
| 23 | +| `func.errors` | Counter | number of errors | Number of invocation errors. | |
| 24 | +| `func.executions` | Counter | number of invocations | number of successful invocations. | |
| 25 | +| `func.timeouts` | Counter | number of timeouts | number of invocation timeouts. | |
26 | 26 |
|
27 | 27 | ## Labels
|
28 | 28 |
|
29 |
| -Below is a table of the labels that SHOULD be included on FaaS metric events. |
| 29 | +Below is a table of the labels that SHOULD be included on Func metric events if applicable. |
30 | 30 |
|
31 | 31 | | Name | Recommended | Notes and examples |
|
32 | 32 | |------|-------------|--------------------|
|
33 |
| -| `faas.trigger` | Yes | Type of the trigger on which the function is invoked. SHOULD be one of: `datasource`, `http`, `pubsub`, `timer`, `other` | |
34 |
| -| `faas.invoked_name` | Yes | Name of the invoked function. Example: `my-function` | |
35 |
| -| `faas.invoked_provider` | Yes | Cloud provider of the invoked function. Corresponds to the resource `cloud.provider`. Example: `aws` | |
36 |
| -| `faas.invoked_region` | Yes | Cloud provider region of invoked function. Corresponds to resource `cloud.region`. Example: `us-east-1` | |
| 33 | +| `func.trigger` | Yes | Type of the trigger on which the function is invoked. SHOULD be one of: `datasource`, `http`, `pubsub`, `timer`, `other` | |
| 34 | +| `func.invoked_name` | Yes | Name of the invoked function. Example: `my-function` | |
| 35 | +| `func.invoked_provider` | Yes | Cloud provider of the invoked function. Corresponds to the resource `cloud.provider`. Example: `aws` | |
| 36 | +| `func.invoked_region` | Yes | Cloud provider region of invoked function. Corresponds to resource `cloud.region`. Example: `us-east-1` | |
37 | 37 |
|
38 | 38 | ## References
|
39 | 39 |
|
40 | 40 | ### Metric Reference
|
41 | 41 |
|
42 | 42 | Below are links to documentation regarding metrics that are available with different
|
43 |
| -FaaS providers. This list is not exhaustive. |
| 43 | +FaaS providers and other vendors. This list is not exhaustive. |
44 | 44 |
|
45 | 45 | * [AWS Lambda Metrics](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics.html)
|
46 | 46 | * [Azure Functions Metrics](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported)
|
47 | 47 | * [Google CloudFunctions Metrics](https://cloud.google.com/monitoring/api/metrics_gcp#gcp-cloudfunctions)
|
48 | 48 | * [OpenFaas Metrics](https://docs.openfaas.com/architecture/metrics/)
|
| 49 | +* [Openwhisk Metrics](https://github.com/apache/openwhisk/blob/master/docs/metrics.md) |
0 commit comments