You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specification/metrics/semantic_conventions/faas-metrics.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ Below is a table of FaaS invocation metric instruments.
42
42
|`faas.init_duration`| Histogram | milliseconds |`ms`| Measures the duration of the function's initialization, such as a cold start |
43
43
|`faas.coldstarts`| Counter | default unit |`{coldstarts}`| Number of invocation cold starts. |
44
44
|`faas.errors`| Counter | default unit |`{errors}`| Number of invocation errors. |
45
-
|`faas.executions`| Counter | default unit |`{executions}`| Number of successful invocations. |
45
+
|`faas.invocations`| Counter | default unit |`{invocations}`| Number of successful invocations. |
46
46
|`faas.timeouts`| Counter | default unit |`{timeouts}`| Number of invocation timeouts. |
47
47
48
48
Optionally, when applicable:
@@ -65,9 +65,9 @@ Below is a table of the attributes to be included on FaaS metric events.
65
65
|`faas.invoked_region`| Required | Cloud provider region of invoked function. Corresponds to resource `cloud.region`. Example: `us-east-1`|
66
66
67
67
More details on these attributes, the function name and the difference compared to the faas.invoked_name can be found at the related [FaaS tracing specification](../../trace/semantic_conventions/faas.md).
68
-
For incoming FaaS executions, the function for which metrics are reported is already described by its [FaaS resource attributes](../../resource/semantic_conventions/faas.md).
69
-
Outgoing FaaS executions are identified using the `faas.invoked_*` attributes above.
70
-
`faas.trigger` SHOULD be included in all metric events while `faas.invoked_*` attributes apply on outgoing FaaS execution events only.
68
+
For incoming FaaS invocations, the function for which metrics are reported is already described by its [FaaS resource attributes](../../resource/semantic_conventions/faas.md).
69
+
Outgoing FaaS invocations are identified using the `faas.invoked_*` attributes above.
70
+
`faas.trigger` SHOULD be included in all metric events while `faas.invoked_*` attributes apply on outgoing FaaS invocation events only.
Copy file name to clipboardExpand all lines: specification/resource/semantic_conventions/faas.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ See also:
20
20
|`faas.id`| string | The unique ID of the single function that this runtime instance executes. [2]|`arn:aws:lambda:us-west-2:123456789012:function:my-function`| Recommended |
21
21
|`faas.version`| string | The immutable version of the function being executed. [3]|`26`; `pinkfroid-00002`| Recommended |
22
22
|`faas.instance`| string | The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. [4]|`2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de`| Recommended |
23
-
|`faas.max_memory`| int | The amount of memory available to the serverless function in MiB. [5]|`128`| Recommended |
23
+
|`faas.max_memory`| int | The amount of memory available to the serverless function converted to Bytes. [5]|`134217728`| Recommended |
24
24
25
25
**[1]:** This is the name of the function as configured/deployed on the FaaS
26
26
platform and is usually different from the name of the callback
@@ -68,10 +68,10 @@ The exact value to use for `faas.id` depends on the cloud provider:
68
68
69
69
**[4]:** * **AWS Lambda:** Use the (full) log stream name.
70
70
71
-
**[5]:** It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information.
71
+
**[5]:** It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must be multiplied by 1,048,576).
72
72
<!-- endsemconv -->
73
73
74
-
Note: The resource attribute `faas.instance` differs from the span attribute `faas.execution`. For more information see the [Semantic conventions for FaaS spans](../../trace/semantic_conventions/faas.md#difference-between-execution-and-instance).
74
+
Note: The resource attribute `faas.instance` differs from the span attribute `faas.invocation_id`. For more information see the [Semantic conventions for FaaS spans](../../trace/semantic_conventions/faas.md#difference-between-invocation-and-instance).
75
75
76
76
## Using span attributes instead of resource attributes
|`faas.trigger`| string | Type of the trigger which caused this function execution. [1]|`datasource`| Recommended |
41
-
|`faas.execution`| string | The execution ID of the current function execution. |`af9d5aa4-a685-4c5f-a22b-444f80b3cc28`| Recommended |
40
+
|`faas.trigger`| string | Type of the trigger which caused this function invocation. [1]|`datasource`| Recommended |
41
+
|`faas.invocation_id`| string | The invocation ID of the current function invocation. |`af9d5aa4-a685-4c5f-a22b-444f80b3cc28`| Recommended |
42
42
43
43
**[1]:** For the server/consumer span on the incoming side,
44
44
`faas.trigger` MUST be set.
@@ -73,15 +73,15 @@ purpose. It is also highly likely that Span name will contain the function name
73
73
weaker "SHOULD" requirement). Consumers that needs such guarantee can use
74
74
`faas.name` attribute as the source.
75
75
76
-
### Difference between execution and instance
76
+
### Difference between invocation and instance
77
77
78
78
For performance reasons (e.g. [AWS lambda], or [Azure functions]), FaaS providers allocate an execution environment for a single instance of a function that is used to serve multiple requests.
79
-
Developers exploit this fact to solve the **cold start** issue, caching expensive resource computations between different function executions.
79
+
Developers exploit this fact to solve the **cold start** issue, caching expensive resource computations between different function invocations.
80
80
Furthermore, FaaS providers encourage this behavior, e.g. [Google functions].
81
-
The `faas.instance` resource attribute MAY be set to help correlate function executions that belong to the same execution environment.
82
-
The span attribute `faas.execution` differs from the [resource attribute][FaaS resource attributes]`faas.instance` in the following:
81
+
The `faas.instance` resource attribute MAY be set to help correlate function invocations that belong to the same execution environment.
82
+
The span attribute `faas.invocation_id` differs from the [resource attribute][FaaS resource attributes]`faas.instance` in the following:
83
83
84
-
-`faas.execution` refers to the current request ID handled by the function;
84
+
-`faas.invocation_id` refers to the ID of the current invocation of the function;
85
85
-`faas.instance` refers to the execution environment ID of the function.
|`faas.coldstart`| boolean | A boolean that is true if the serverless function is executed for the first time (aka cold-start). || Recommended |
103
-
|`faas.trigger`| string | Type of the trigger which caused this function execution. [1]|`datasource`| Required |
103
+
|`faas.trigger`| string | Type of the trigger which caused this function invocation. [1]|`datasource`| Required |
104
104
105
105
**[1]:** For the server/consumer span on the incoming side,
106
106
`faas.trigger` MUST be set.
@@ -197,9 +197,9 @@ The function responsibility is to provide an answer to an inbound HTTP request.
197
197
### PubSub
198
198
199
199
A function is set to be executed when messages are sent to a messaging system.
200
-
In this case, multiple messages could be batch and forwarded at once to the same function execution.
200
+
In this case, multiple messages could be batch and forwarded at once to the same function invocation.
201
201
Therefore, a different root span of type `faas` MUST be created for each message processed by the function, following the [Messaging systems semantic conventions](messaging.md).
202
-
This way, it is possible to correlate each individual message with its execution sender.
202
+
This way, it is possible to correlate each individual message with its invocation sender.
203
203
204
204
### Timer
205
205
@@ -230,7 +230,7 @@ This example shows the FaaS attributes for a (non-FaaS) process hosted on Google
0 commit comments