-
Notifications
You must be signed in to change notification settings - Fork 404
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: Replace request.abort with response.close in HTTP instrumentation #1510
fix: Replace request.abort with response.close in HTTP instrumentation #1510
Conversation
NR-88357 In Node.js 16, there was a breaking change where request.aborted will no longer be emitted by the HTTP Node core. Instead, we will now rely on response.close, which works in all currently supported versioned of node (14/16/18)
Codecov Report
@@ Coverage Diff @@
## main #1510 +/- ##
=======================================
Coverage 96.39% 96.39%
=======================================
Files 196 196
Lines 38193 38198 +5
Branches 23 23
=======================================
+ Hits 36817 36822 +5
Misses 1376 1376
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
||
'use strict' | ||
|
||
// Polyfill till we drop support for Node 14 |
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.
Should we cut a ticket to remove this when we drop 14?
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.
I actually replaced the abort controller with request.destroy, so no need to use the abort controller anymore
Proposed Release Notes
request.aborted
withresponse.close
in HTTP instrumentation.Links
autoDestroy: true
in incoming message nodejs/node#33035Details
In Node.js 16, there was a breaking change where
request.aborted
will no longer be emitted by the HTTP Node core. Instead, we will now rely onresponse.close
, which works in all currently supported versioned of node (14/16/18)