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
As per the discussion on #3188, we determined it is better to move rather than remove as this attribute is still important for some systems despite it containing duplicated information.
Copy file name to clipboardExpand all lines: specification/resource/semantic_conventions/cloud.md
+23-4Lines changed: 23 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,14 +12,33 @@
12
12
|`cloud.provider`| string | Name of the cloud provider. |`alibaba_cloud`| Recommended |
13
13
|`cloud.account.id`| string | The cloud account ID the resource is assigned to. |`111111111111`; `opentelemetry`| Recommended |
14
14
|`cloud.region`| string | The geographical region the resource is running. [1]|`us-central1`; `us-east-1`| Recommended |
15
-
|`cloud.availability_zone`| string | Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. [2]|`us-east-1c`| Recommended |
16
-
|`cloud.platform`| string | The cloud platform in use. [3]|`alibaba_cloud_ecs`| Recommended |
15
+
|`cloud.resource_id`| string | A unique identifier for a specific cloud resource. [2]|`arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function`; `//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID`; `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`| Recommended |
16
+
|`cloud.availability_zone`| string | Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. [3]|`us-east-1c`| Recommended |
17
+
|`cloud.platform`| string | The cloud platform in use. [4]|`alibaba_cloud_ecs`| Recommended |
17
18
18
19
**[1]:** Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://intl.cloud.tencent.com/document/product/213/6091).
19
20
20
-
**[2]:** Availability zones are called "zones" on Alibaba Cloud and Google Cloud.
21
+
**[2]:** On some cloud providers, it may not be possible to determine the full ID at startup,
22
+
so it may be necessary to set `cloud.resource_id` as a span attribute instead.
21
23
22
-
**[3]:** The prefix of the service SHOULD match the one specified in `cloud.provider`.
24
+
The exact value to use for `cloud.resource_id` depends on the cloud provider.
25
+
For example, with FAAS platforms, use the following guidelines:
26
+
27
+
***AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
28
+
Take care not to use the "invoked ARN" directly but replace any
This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share
37
+
a TracerProvider.
38
+
39
+
**[3]:** Availability zones are called "zones" on Alibaba Cloud and Google Cloud.
40
+
41
+
**[4]:** The prefix of the service SHOULD match the one specified in `cloud.provider`.
23
42
24
43
`cloud.provider` 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.
|`faas.name`| string | The name of the single function that this runtime instance executes. [1]|`my-function`; `myazurefunctionapp/some-function-name`| Required |
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
-
|`faas.version`| string | The immutable version of the function being executed. [3]|`26`; `pinkfroid-00002`| Recommended |
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 |
20
+
|`faas.version`| string | The immutable version of the function being executed. [2]|`26`; `pinkfroid-00002`| Recommended |
21
+
|`faas.instance`| string | The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. [3]|`2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de`| Recommended |
22
+
|`faas.max_memory`| int | The amount of memory available to the serverless function in MiB. [4]|`128`| Recommended |
24
23
25
24
**[1]:** This is the name of the function as configured/deployed on the FaaS
26
25
platform and is usually different from the name of the callback
@@ -37,26 +36,9 @@ definition of function name MUST be used for this attribute
37
36
can also be seen in the resource JSON for the function).
38
37
This means that a span attribute MUST be used, as an Azure function
39
38
app can host multiple functions that would usually share
40
-
a TracerProvider (see also the `faas.id` attribute).
39
+
a TracerProvider (see also the `cloud.resource_id` attribute).
41
40
42
-
**[2]:** On some cloud providers, it may not be possible to determine the full ID at startup,
43
-
so consider setting `faas.id` as a span attribute instead.
44
-
45
-
The exact value to use for `faas.id` depends on the cloud provider:
46
-
47
-
***AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
48
-
Take care not to use the "invoked ARN" directly but replace any
***Azure Functions:** Not applicable. Do not set this attribute.
68
50
69
-
**[4]:** * **AWS Lambda:** Use the (full) log stream name.
51
+
**[3]:** * **AWS Lambda:** Use the (full) log stream name.
70
52
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.
53
+
**[4]:** 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.
72
54
<!-- endsemconv -->
73
55
74
56
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).
Copy file name to clipboardExpand all lines: specification/trace/semantic_conventions/instrumentation/aws-lambda.md
+2-13Lines changed: 2 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,14 +37,7 @@ Lambda `Context`.
37
37
The following attributes SHOULD be set:
38
38
39
39
-[`faas.execution`][faas] - The value of the AWS Request ID, which is always available through an accessor on the Lambda `Context`.
40
-
-[`faas.id`][faasres] - The value of the invocation ARN
41
-
for the function, which is always available through an accessor on the
42
-
Lambda `Context`, modified as follows: Discard all parts beyond the seventh (when split on `:`;
43
-
the seventh part is the function name) and append the [`faas.version`][faasres], separated by a colon.
44
-
45
-
Note that this is set as span attribute instead of resource attribute due to technical limitations
46
-
(account ID is not available at startup).
47
-
-[`cloud.account.id`][cloud] - In some languages, this is available as an accessor on the Lambda `Context`. Otherwise, it can be parsed from the value of `faas.id` as the fifth item when splitting on `:`
40
+
-[`cloud.account.id`][cloud] - In some languages, this is available as an accessor on the Lambda `Context`. Otherwise, it can be parsed from the ARN as the fifth item when splitting on `:`
48
41
49
42
Also consider setting other attributes of the [`faas` resource][faasres] and [trace][faas] conventions
50
43
and the [cloud resource conventions][cloud]. The following AWS Lambda-specific attribute MAY also be set:
@@ -54,7 +47,7 @@ and the [cloud resource conventions][cloud]. The following AWS Lambda-specific a
54
47
|---|---|---|---|---|
55
48
|`aws.lambda.invoked_arn`| string | The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). [1]|`arn:aws:lambda:us-east-1:123456:function:myfunction:myalias`| Recommended |
56
49
57
-
**[1]:** This may be different from `faas.id` if an alias is involved.
50
+
**[1]:** This may be different from `cloud.resource_id` if an alias is involved.
0 commit comments