-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat: Instrument Lambda invocations in AWS SDK #2901
base: main
Are you sure you want to change the base?
Conversation
src/Agent/NewRelic/Agent/Extensions/NewRelic.Agent.Extensions/Collections/ConcurrentHashSet.cs
Show resolved
Hide resolved
.../Common/MultiFunctionApplicationHelpers/NetStandardLibraries/AwsSdk/InvokeLambdaExerciser.cs
Show resolved
Hide resolved
private string GetAccountId(IAgent agent) | ||
{ | ||
string accountId = agent.Configuration.AwsAccountId; | ||
if (accountId != null) |
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.
it would be more performant to check _reportBadAccountId
here - if it's false
, none of the rest of the validation needs to be done.
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.
If that's the case, should the validation be done in the DefaultConfiguration class instead?
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.
I had planned on revisiting this after the ID decoding was done. There were a few things I wanted to consider:
- Having the validation in a central place
- We may want to fall back to the other ID method if one is invalid
- The environment variable for the ID may be set after we've read the config
- Depending on how we found the ID, it may be bad at first but good later
…b.com/newrelic/newrelic-dotnet-agent into feature/invoke-lambda-instrumentation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2901 +/- ##
==========================================
+ Coverage 81.42% 81.46% +0.04%
==========================================
Files 465 466 +1
Lines 29563 29692 +129
Branches 3278 3305 +27
==========================================
+ Hits 24071 24188 +117
- Misses 4698 4712 +14
+ Partials 794 792 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Instrument calls to Lambdas and Lambda Aliases from the AWS SDK, with span attributes to allow linking the calls to the actual Lambda (specifically the ARN is what's needed). Includes unit and integration tests. We are able to test without a making a successful call to a lambda, so no live testing resources are necessary.
Changes since the last PR: