-
Notifications
You must be signed in to change notification settings - Fork 598
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
instrumentation for aws-sdk-lambda #2926
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instrument the aws-sdk-lambda gem and upon function invocations performed by the client, create external request segments that include AWS resource information.
there are 2 routes errors can take: * exceptions thrown from the client SDK * used for HTTP 4xx/5xx responses * use for the client SDK itself raising an internal error * an unhandled function error which sets the `:function_error` key in the response
require Ruby 2.5+ for testing aws-sdk-lambda
update to match dev changes regarding AWS account id
fallwith
requested review from
hannahramadan,
kaylareopelle and
tannalynn
as code owners
October 31, 2024 23:41
The function invocation methods offered by the aws-sdk-lambda gem take the `:function_name` argument in the form of `<function name>:<alias>` or `<function name>:<version>` when an alias or version is involved. The agent will simply preserve the extra info and the colon delimiter and segment naming and AWS arn creation will simply end up doing the right thing with the extra alias or version info.
update CHANGELOG.md for aws-sdk-lambda
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.
This looks great, James! It's been a while since I've thought about lambdas, so I have a few clarification questions in the PR.
lib/new_relic/agent/instrumentation/aws_sdk_lambda/instrumentation.rb
Outdated
Show resolved
Hide resolved
lib/new_relic/agent/instrumentation/aws_sdk_lambda/instrumentation.rb
Outdated
Show resolved
Hide resolved
test/multiverse/suites/aws_sdk_lambda/aws_sdk_lambda_instrumentation_test.rb
Show resolved
Hide resolved
test/multiverse/suites/aws_sdk_lambda/aws_sdk_lambda_instrumentation_test.rb
Show resolved
Hide resolved
don't attempt to determine the region twice within a single method and simply re-use the result of the single call
remove large source code comment that exists in the instrumentation generator as boilerplate for the new instrumentation author to review and remove
SimpleCov Report
|
use separate error handling for errors raised by the gem itself and errors raised by the agent. Errors raised by the gem need to be noticed by the agent (sent to New Relic) and re-raised to the user's app. Errors raised by the agent need to be logged but not impact the returning of the successful gem invocation response. Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com>
tannalynn
reviewed
Nov 4, 2024
tannalynn
approved these changes
Nov 4, 2024
This was referenced Nov 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instrument the aws-sdk-lambda gem and upon function invocations performed by the client, create external request segments that include AWS resource information.