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

refs #294, add support for AWS SDK v3 #386

Merged
merged 7 commits into from
Mar 22, 2021
Merged

Conversation

monken
Copy link
Contributor

@monken monken commented Mar 6, 2021

#294

  • add support for AWS SDK v3

I used typescript for the actual patcher because it makes the code safer and I wanted to make sure that types are maintained when using the XRay patcher. I included the complied JavaScript code as well so that tests can be run without adding more typescript flavor to the project.

There is no captureAWS for now and I also haven't looked at manual mode much because I'm unsure about how to pass in the xray params in a type-safe way.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@monken
Copy link
Contributor Author

monken commented Mar 6, 2021

@willarmiros sorry I messed up and deleted the source branch, this replaces #298

@monken
Copy link
Contributor Author

monken commented Mar 6, 2021

@willarmiros for some reason @aws-sdk/service-error-classification doesn't get installed before the tests are executed. Could you please have a look? Do I need to add it to the root package.json file instead?

@willarmiros
Copy link
Contributor

willarmiros commented Mar 8, 2021

@monken we recently committed a package-lock.json to our repo and use it for CI tests. You'll probably need to rebase then run a npx lerna bootstrap --hoist from the root of the repo to generate it and include the new deps.

@codecov-io
Copy link

codecov-io commented Mar 8, 2021

Codecov Report

Merging #386 (9b0c890) into master (0d806dc) will increase coverage by 0.61%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #386      +/-   ##
==========================================
+ Coverage   82.49%   83.10%   +0.61%     
==========================================
  Files          36       37       +1     
  Lines        1691     1758      +67     
==========================================
+ Hits         1395     1461      +66     
- Misses        296      297       +1     
Impacted Files Coverage Δ
lib/aws-xray.js 92.30% <0.00%> (ø)
lib/patchers/aws3_p.js 94.02% <0.00%> (ø)
lib/segments/attributes/subsegment.js 76.87% <0.00%> (+0.68%) ⬆️
lib/patchers/call_capturer.js 91.93% <0.00%> (+3.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d806dc...9b0c890. Read the comment docs.

@monken
Copy link
Contributor Author

monken commented Mar 8, 2021

@willarmiros looks much better now, thanks! Sorry, please re-open.

@monken monken closed this Mar 8, 2021
@willarmiros willarmiros reopened this Mar 8, 2021
Copy link
Contributor

@willarmiros willarmiros left a comment

Choose a reason for hiding this comment

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

Approving because the last comment isn't really blocking, but would be nice to have to avoid confusion in the future. Nice work @monken!

packages/core/test/unit/patchers/aws3_p.test.js Outdated Show resolved Hide resolved
packages/core/test/unit/patchers/aws3_p.test.js Outdated Show resolved Hide resolved
@willarmiros
Copy link
Contributor

@monken any update on these final couple changes?

@monken
Copy link
Contributor Author

monken commented Mar 22, 2021

Oh I thought we were done. Sorry about this. I'll push the changes today.

Copy link
Contributor

@willarmiros willarmiros left a comment

Choose a reason for hiding this comment

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

Tests are updated and passing, merging time!

@willarmiros willarmiros merged commit 5ead789 into aws:master Mar 22, 2021
willarmiros pushed a commit to willarmiros/aws-xray-sdk-node that referenced this pull request Apr 12, 2021
willarmiros added a commit that referenced this pull request Apr 12, 2021
* revert PR #386

* no backwards incompatibility
willarmiros pushed a commit to willarmiros/aws-xray-sdk-node that referenced this pull request Apr 13, 2021
willarmiros pushed a commit that referenced this pull request Apr 13, 2021
This reverts commit 9e20d2e.
willarmiros added a commit that referenced this pull request May 12, 2021
* Revert "Revert PR #386 (#412)"

This reverts commit 9e20d2e.

* Add proper TypeScript build logic (#417)

* build core files to dist directory

* fixed unit tests

* updated workflows and readme

* try to fix windows

* fix ls

* slashes

* no more ls

* zstd decompress

* see what bin has

* removed rsync

* fixes

* added sh

* try xargs instead

* cleanups

* fixed publishing logic

* Redesign AWS SDK V3 instrumentation to use middleware (#416)

* updated deps and type file

* removed type keyword added deps

* remove changes to js

* updated versions

* finished redesign of aws sdk v3 instrumentation

* refactored buildAttributes signature

* add compile back to workflow

* bumped tsd version instead

Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>

* removed dependencies and added docs

* add back most changes, update types

* removed aws-v3 branch from CI

* fixed codecov to use dist directory

* added blog post link

Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
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.

3 participants