Skip to content

Have AwsLambdaInstrumentor set cloud.account.id span attribute #2368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tammy-baylis-swi opened this issue Mar 22, 2024 · 1 comment · Fixed by #2367
Closed

Have AwsLambdaInstrumentor set cloud.account.id span attribute #2368

tammy-baylis-swi opened this issue Mar 22, 2024 · 1 comment · Fixed by #2367
Assignees

Comments

@tammy-baylis-swi
Copy link
Contributor

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.

@tammy-baylis-swi
Copy link
Contributor Author

I have a PR for this: #2367

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant