Skip to content
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

fix(detector-aws): update aws lambda detector #2589

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

garysassano
Copy link

@garysassano garysassano commented Dec 6, 2024

Which problem is this PR solving?

  • Removing deprecated imports
    image

  • Adding extra attributes: aws.log.group.names, faas.instance, faas.max_memory

Short description of the changes

See above.

@garysassano garysassano requested a review from a team as a code owner December 6, 2024 01:08
Copy link

linux-foundation-easycla bot commented Dec 6, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot requested a review from jj22ee December 6, 2024 01:08
@garysassano garysassano changed the title update aws lambda detector fix(detector-aws): update aws lambda detector Dec 6, 2024
'aws.log.group.names': [logGroupName],
'cloud.provider': 'aws',
'cloud.platform': 'aws_lambda',
'cloud.region': awsRegion,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For attribute values that can possibly be undefined (even if not expected to be so), I think it would be safer to keep the if checks to only add such attributes if defined.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this context, it's unnecessary to check for undefined runtime environment variables. Since you're already ensuring the code runs within a Lambda environment, these variables are guaranteed to be present. Adding extra checks for them would undermine the purpose of AWS's standardization across Lambda runtimes, as detailed in the docs.

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

Successfully merging this pull request may close these issues.

2 participants