Skip to content

add aws-sdk as parameter to xray helper#28

Merged
jagoda merged 4 commits intolifeomic:masterfrom
cmjarreau:add-aws-sdk-as-parameter-to-xray-helper
Aug 14, 2018
Merged

add aws-sdk as parameter to xray helper#28
jagoda merged 4 commits intolifeomic:masterfrom
cmjarreau:add-aws-sdk-as-parameter-to-xray-helper

Conversation

@cmjarreau
Copy link

this will give us the functionality to accommodate the conditional operators encountered in many cases by being able to return a captureAWS object from the aws-sdk

Chad Jarreau added 2 commits August 8, 2018 13:52
add aws-sdk as parameter to xray helper
fix build - linting errors
@coveralls
Copy link

coveralls commented Aug 8, 2018

Pull Request Test Coverage Report for Build 169

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 155: 0.0%
Covered Lines: 375
Relevant Lines: 375

💛 - Coveralls

remove unnecessary function, reorder for tidying up code
@mdlavin mdlavin self-requested a review August 9, 2018 11:59
xray.captureAWS(require('aws-sdk'));
xray.capturePromise();
}
exports.captureWithXRay = function (awsSdk) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to make awsSdk as optional, because I think most times default aws-sdk would be fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that using the default is actually problematic unless we add a peerDependencies requirement to package.json. If the calling project and lambda-tools do not agree on the aws-sdk version then the caller's SDK instance will not get instrumented and there will not be any warning.

@mdlavin
Copy link
Contributor

mdlavin commented Aug 9, 2018 via email

comment explaining why we pass in client aws-sdk
@jagoda jagoda merged commit 7488db7 into lifeomic:master Aug 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants