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

instrumentation for aws-sdk-lambda #2926

Merged
merged 11 commits into from
Nov 5, 2024
Merged

instrumentation for aws-sdk-lambda #2926

merged 11 commits into from
Nov 5, 2024

Conversation

fallwith
Copy link
Contributor

Instrument the aws-sdk-lambda gem and upon function invocations performed by the client, create external request segments that include AWS resource information.

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 fallwith marked this pull request as ready for review 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
Copy link
Contributor

@kaylareopelle kaylareopelle left a 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.

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
Copy link
Contributor

github-actions bot commented Nov 2, 2024

SimpleCov Report

Coverage Threshold
Line 93.85% 93%
Branch 69.72% 50%

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>
@fallwith fallwith merged commit d056cfe into dev Nov 5, 2024
35 of 36 checks passed
@fallwith fallwith deleted the severless branch November 5, 2024 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Code Complete/Done
Development

Successfully merging this pull request may close these issues.

3 participants