-
Notifications
You must be signed in to change notification settings - Fork 907
Description
Is your feature request related to a problem?
No.
Describe the solution you'd like
The current Otel semconv for FAAS says this and it would be good for the AWS Lambda instrumentor to follow:
The following attributes SHOULD be set:
cloud.account.id - 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 :
cloud.account.id is already defined in the current Python semconvgen here. This doesn't seem to replace a deprecated/migrated attribute key, so I think this would be an additive change.
In AWS Lambda Context there is no account accessor. So setting cloud.account.id would do the ARN split described in the semconv.
Describe alternatives you've considered
One alternative could be to implement AwsLambdaInstrumentor request/response hooks (issue 1140) to set this attribute. But if this is to follow the semconv then I think the attribute setting should always happen.
If this is not actually an additive change and cloud.account.id replaces a deprecated key, then this should be part of semconv migration.
Additional context
None.