Skip to content

Commit 46cc53f

Browse files
committed
Remove faas.id
As decided in the FAAS SIG. It has an unhelpful, non-descript name. Duplicates data already found in other attributes. Not consistent across platforms. Seems safer to remove prior to GA and re-add later if needed.
1 parent a0d8391 commit 46cc53f

File tree

5 files changed

+10
-65
lines changed

5 files changed

+10
-65
lines changed

semantic_conventions/resource/faas.yaml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,8 @@ groups:
2626
can also be seen in the resource JSON for the function).
2727
This means that a span attribute MUST be used, as an Azure function
2828
app can host multiple functions that would usually share
29-
a TracerProvider (see also the `faas.id` attribute).
30-
examples: ['my-function', 'myazurefunctionapp/some-function-name']
31-
- id: id
32-
type: string
33-
brief: >
34-
The unique ID of the single function that this runtime instance executes.
35-
note: |
36-
On some cloud providers, it may not be possible to determine the full ID at startup,
37-
so consider setting `faas.id` as a span attribute instead.
38-
39-
The exact value to use for `faas.id` depends on the cloud provider:
40-
41-
* **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
42-
Take care not to use the "invoked ARN" directly but replace any
43-
[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
44-
with the resolved function version, as the same runtime instance may be invokable with
45-
multiple different aliases.
46-
* **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)
47-
* **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id) of the invoked function,
48-
*not* the function app, having the form
49-
`/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
50-
This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share
5129
a TracerProvider.
52-
examples: ['arn:aws:lambda:us-west-2:123456789012:function:my-function']
30+
examples: ['my-function', 'myazurefunctionapp/some-function-name']
5331
- id: version
5432
type: string
5533
brief: The immutable version of the function being executed.

semantic_conventions/trace/aws/lambda.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ groups:
1010
brief: >
1111
The full invoked ARN as provided on the `Context` passed to the function
1212
(`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).
13-
note: This may be different from `faas.id` if an alias is involved.
1413
examples: ['arn:aws:lambda:us-east-1:123456:function:myfunction:myalias']

specification/resource/semantic_conventions/faas.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ See also:
1717
| Attribute | Type | Description | Examples | Requirement Level |
1818
|---|---|---|---|---|
1919
| `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 Bytes. [5] | `128000000` | 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 Bytes. [4] | `128000000` | Recommended |
2423

2524
**[1]:** This is the name of the function as configured/deployed on the FaaS
2625
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
3736
can also be seen in the resource JSON for the function).
3837
This means that a span attribute MUST be used, as an Azure function
3938
app can host multiple functions that would usually share
40-
a TracerProvider (see also the `faas.id` attribute).
41-
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
49-
[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
50-
with the resolved function version, as the same runtime instance may be invokable with
51-
multiple different aliases.
52-
* **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)
53-
* **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id) of the invoked function,
54-
*not* the function app, having the form
55-
`/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
56-
This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share
5739
a TracerProvider.
5840

59-
**[3]:** Depending on the cloud provider and platform, use:
41+
**[2]:** Depending on the cloud provider and platform, use:
6042

6143
* **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
6244
(an integer represented as a decimal string).
@@ -66,9 +48,9 @@ The exact value to use for `faas.id` depends on the cloud provider:
6648
[`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
6749
* **Azure Functions:** Not applicable. Do not set this attribute.
6850

69-
**[4]:** * **AWS Lambda:** Use the (full) log stream name.
51+
**[3]:** * **AWS Lambda:** Use the (full) log stream name.
7052

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 (multiplied by 1000000).
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 (multiplied by 1000000).
7254
<!-- endsemconv -->
7355

7456
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).

specification/trace/semantic_conventions/faas.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ FaaS environments some of the information required for resource
121121
attributes is only readily available in the context of an invocation (e.g. as part of a "request context" argument)
122122
and while a separate API call to look up the resource information is often possible, it
123123
may be prohibitively expensive due to cold start duration concerns.
124-
The `faas.id` and `cloud.account.id` attributes on AWS are some examples.
124+
The `cloud.account.id` attribute on AWS is one example.
125125
In principle, the above considerations apply to any resource attribute that fulfills the criteria above
126126
(not being readily available without some extra effort that could be expensive).
127127

@@ -233,6 +233,5 @@ This example shows the FaaS attributes for a (non-FaaS) process hosted on Google
233233
| Span | `faas.invocation_id` | n/a | `"af9d5aa4-a685-4c5f-a22b-444f80b3cc28"` |
234234
| Span | `faas.coldstart` | n/a | `true` |
235235
| Resource | `faas.name` | n/a | `"my-lambda-function"` |
236-
| Resource | `faas.id` | n/a | `"arn:aws:lambda:us-west-2:123456789012:function:my-lambda-function"` |
237236
| Resource | `faas.version` | n/a | `"semver:2.0.0"` |
238237
| Resource | `faas.instance` | n/a | `"my-lambda-function:instance-0001"` |

specification/trace/semantic_conventions/instrumentation/aws-lambda.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,15 @@ Lambda `Context`.
3737
The following attributes SHOULD be set:
3838

3939
- [`faas.invocation_id`][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 `:`
4841

4942
Also consider setting other attributes of the [`faas` resource][faasres] and [trace][faas] conventions
5043
and the [cloud resource conventions][cloud]. The following AWS Lambda-specific attribute MAY also be set:
5144

5245
<!-- semconv aws.lambda -->
5346
| Attribute | Type | Description | Examples | Requirement Level |
5447
|---|---|---|---|---|
55-
| `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-
57-
**[1]:** This may be different from `faas.id` if an alias is involved.
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). | `arn:aws:lambda:us-east-1:123456:function:myfunction:myalias` | Recommended |
5849
<!-- endsemconv -->
5950

6051
[faas]: ../faas.md (FaaS trace conventions)
@@ -173,7 +164,6 @@ Function F: | Span Function |
173164
| SpanKind | `CLIENT` | `SERVER` |
174165
| Status | `Ok` | `Ok` |
175166
| `faas.invocation_id` | | `79104EXAMPLEB723` |
176-
| `faas.id` | | `arn:aws:lambda:us-west-2:123456789012:function:my-function` |
177167
| `faas.trigger` | | `http` |
178168
| `cloud.account.id` | | `12345678912` |
179169
| `net.peer.name` | `foo.execute-api.us-east-1.amazonaws.com` | |
@@ -255,7 +245,4 @@ AWS Lambda resource information is available as [environment variables][] provid
255245
- [`faas.name`][faasres] MUST be set to the value of the `AWS_LAMBDA_FUNCTION_NAME` environment variable
256246
- [`faas.version`][faasres] MUST be set to the value of the `AWS_LAMBDA_FUNCTION_VERSION` environment variable
257247

258-
Note that [`faas.id`][faasres] currently cannot be populated to resource
259-
because it is not available until function invocation.
260-
261248
[environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime

0 commit comments

Comments
 (0)