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

Prisma sdk contrib #532

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Prisma sdk contrib #532

wants to merge 15 commits into from

Conversation

EduardMcfly
Copy link

@EduardMcfly EduardMcfly commented Sep 6, 2022

Add X-Ray plugin for Prisma

Add typing, unit tests, examples with automatic mode and manual mode

The package was published in @cosva-lab/aws-xray-sdk-prisma and its correct operation was verified.

Example timeline

timeline

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

@EduardMcfly
Copy link
Author

@carolabadeer

@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6a9f999) 83.41% compared to head (5c57955) 83.49%.
Report is 9 commits behind head on master.

❗ Current head 5c57955 differs from pull request most recent head 9213e9e. Consider uploading reports for the commit 9213e9e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #532      +/-   ##
==========================================
+ Coverage   83.41%   83.49%   +0.07%     
==========================================
  Files          37       37              
  Lines        1797     1805       +8     
==========================================
+ Hits         1499     1507       +8     
  Misses        298      298              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

sdk_contrib/prisma/.gitignore Show resolved Hide resolved
sdk_contrib/prisma/NOTICE.txt Outdated Show resolved Hide resolved
sdk_contrib/prisma/README.md Show resolved Hide resolved
sdk_contrib/prisma/package.json Outdated Show resolved Hide resolved
sdk_contrib/prisma/package.json Outdated Show resolved Hide resolved
sdk_contrib/prisma/package.json Outdated Show resolved Hide resolved
sdk_contrib/prisma/samples/auto/simple.js Show resolved Hide resolved
@carolabadeer
Copy link
Contributor

@EduardMcfly thanks for addressing the previous feedback! Can you please take a look at the failing workflows?

This commit adds a new package dependency for integrating AWS X-Ray with Prisma. Specifically, it adds the package "aws-xray-sdk-prisma" and sets its version to 3.5.0 in the package-lock.json file.

Additionally, in the "capturePrisma" function in the "sdk_contrib/prisma/src/capturePrisma.ts" file, an error message is logged if no segment is provided in manual mode.

In the unit tests for the "capturePrisma" function in the "sdk_contrib/prisma/test/unit/prisma.test.js" file, the Prisma client is now initialized with a segment, and the absence of a segment is properly handled and logged as an error.

These changes ensure proper integration of AWS X-Ray with Prisma and improve error handling when manual mode is used without a segment.
* bumped typescript version
* fixed ts errors
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