-
Notifications
You must be signed in to change notification settings - Fork 152
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
Stop throwing unnecessary errors with adding annotations, metadata, errors #467
Conversation
Thanks for this change @wparad! It looks very useful, and I agree with you that the X-Ray SDK should not throw exceptions to the user's app after the initial initialization stage. This is the same philosophy follows with the OTel JS Contrib project which supports X-Ray :) Would you have bandwidth to fix the tests so we can get this merged? |
Codecov Report
@@ Coverage Diff @@
## master #467 +/- ##
==========================================
- Coverage 82.74% 82.58% -0.16%
==========================================
Files 36 36
Lines 1744 1751 +7
==========================================
+ Hits 1443 1446 +3
- Misses 301 305 +4
Continue to review full report at Codecov.
|
@NathanielRN done! |
Please note that my comments still apply as well :) |
@willarmiros, there are no comments on this PR that I can see. |
Ah! That's because they were still |
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.
LGTM! Thanks
Description of changes:
Adding annotations, metadata, and errors with malformed data, will be logged as an error instead of hard crashing the caller. XRay Segments are not production critical code and therefore should never throw an exception when it can be avoided. This changes default values and keys to something xray can handle, but won't crash the caller.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.