-
Notifications
You must be signed in to change notification settings - Fork 587
feat(aws-sdk): add exception hook #2398
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
base: main
Are you sure you want to change the base?
Conversation
dd9b3b3
to
117d248
Compare
117d248
to
8de2ca6
Compare
8de2ca6
to
8fe1574
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2398 +/- ##
==========================================
- Coverage 90.80% 90.80% -0.01%
==========================================
Files 169 169
Lines 8026 8036 +10
Branches 1635 1637 +2
==========================================
+ Hits 7288 7297 +9
- Misses 738 739 +1
|
8fe1574
to
29b9dd2
Compare
@jj22ee can you please take a look at this? I know it was opened before you were made a component owner but it's been sitting for quite a while. |
I think this feature looks reasonable. The package already has similar hooks defined and it is well documented/tested. If it gets rebased I think we can move forward with it. @jj22ee please comment if you disagree otherwise this will get my 👍 |
Hey, sorry for not taking a look at this, thanks @dyladan for the ping. @project0 I suppose this solves #1765 indirectly for you because this allows you to update Span status or unrecord the Span exception via the new |
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.
Just a bit of cleanup. After you resolve the conflicts + merge/rebase with main I'll approve.
@@ -53,6 +53,7 @@ aws-sdk instrumentation has few options available to choose from. You can set th | |||
| ----------------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | |||
| `preRequestHook` | `AwsSdkRequestCustomAttributeFunction` | Hook called before request send, which allow to add custom attributes to span. | | |||
| `responseHook` | `AwsSdkResponseCustomAttributeFunction` | Hook for adding custom attributes when response is received from aws. | | |||
| `exceptionHook` | `AwsSdkExceptionCustomAttributeFunction` | Hook for adding custom attributes when exception is received from aws. | |
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.
| `exceptionHook` | `AwsSdkExceptionCustomAttributeFunction` | Hook for adding custom attributes when exception is received from aws. | | |
| `exceptionHook` | `AwsSdkExceptionCustomAttributeFunction` | Hook for adding custom attributes when exception is received from aws. | |
); | ||
span.setAttribute('error.from.exception.hook', err.name); | ||
}, | ||
|
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.
Please resolve the conflicts and we can get this merged |
Which problem is this PR solving?
Short description of the changes