-
Notifications
You must be signed in to change notification settings - Fork 857
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
fix(http-intrumentation): prevent request socket null from throwing uncaught error #3858
fix(http-intrumentation): prevent request socket null from throwing uncaught error #3858
Conversation
…ncaught error Signed-off-by: Andreas Odysseos <aodysseos91@gmail.com>
Hi, thanks for opening this PR. 🙂 Before we can continue with reviewing this PR, the CLA needs to be signed (see comment here). |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3858 +/- ##
==========================================
- Coverage 92.98% 92.98% -0.01%
==========================================
Files 297 297
Lines 8839 8849 +10
Branches 1815 1817 +2
==========================================
+ Hits 8219 8228 +9
- Misses 620 621 +1
|
@aodysseos can you please sign the CLA? If not, I can reopen the PR under my own account with the CLA signed. |
Hey @dyladan I haven't been able to pick this up and probably won't be till next Monday. Feel free to reopen the PR. |
I've hit this issue today. It happens for me if the server is behind a @fastify/http-proxy . Can I help somehow with resolving this? |
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.
Looks great but the PR still needs an entry in experimental/CHANGELOG.md
and some lint fixes 🙂
Thank you @pichlermarc ! |
Which problem is this PR solving?
When a socket is undefined, the http-instrumentation package throws an error that is not caught. This is causing the application to restart.
Fixes #3560
Short description of the changes
This PR is modifying the
utils.ts
where the issue occurs. It checks if the socket is defined before accessing its contents and sets the relevant attributes only when the socket is defined.Type of change
Please delete options that are not relevant.
Checklist: