-
Notifications
You must be signed in to change notification settings - Fork 532
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
base: main
Are you sure you want to change the base?
Conversation
detectors/node/opentelemetry-resource-detector-aws/src/detectors/AwsLambdaDetectorSync.ts
Outdated
Show resolved
Hide resolved
'aws.log.group.names': [logGroupName], | ||
'cloud.provider': 'aws', | ||
'cloud.platform': 'aws_lambda', | ||
'cloud.region': awsRegion, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Which problem is this PR solving?
Removing deprecated imports
Adding extra attributes:
aws.log.group.names
,faas.instance
,faas.max_memory
Short description of the changes
See above.