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

fix: Replace request.abort with response.close in HTTP instrumentation #1510

Merged
merged 4 commits into from
Feb 21, 2023
Merged

fix: Replace request.abort with response.close in HTTP instrumentation #1510

merged 4 commits into from
Feb 21, 2023

Conversation

jmartin4563
Copy link
Contributor

@jmartin4563 jmartin4563 commented Feb 16, 2023

Proposed Release Notes

  • fix: Replaced request.aborted with response.close in HTTP instrumentation.

Links

Details

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)

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
Copy link

codecov bot commented Feb 16, 2023

Codecov Report

Merging #1510 (0997b3d) into main (12d2fda) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           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           
Flag Coverage Δ
esm-unit-tests-14.x 47.57% <ø> (ø)
esm-unit-tests-16.x 92.14% <ø> (ø)
esm-unit-tests-18.x 92.14% <ø> (ø)
integration-tests-14.x 77.58% <100.00%> (+<0.01%) ⬆️
integration-tests-16.x 77.67% <100.00%> (-0.01%) ⬇️
integration-tests-18.x 77.67% <100.00%> (+<0.01%) ⬆️
unit-tests-14.x 90.24% <100.00%> (+<0.01%) ⬆️
unit-tests-16.x 90.30% <100.00%> (+<0.01%) ⬆️
unit-tests-18.x 90.28% <100.00%> (+<0.01%) ⬆️
versioned-tests-14.x 75.19% <100.00%> (+<0.01%) ⬆️
versioned-tests-16.x 76.61% <100.00%> (+<0.01%) ⬆️
versioned-tests-18.x 76.61% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/instrumentation/core/http.js 90.84% <100.00%> (ø)
lib/config/index.js 94.66% <0.00%> (+0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@bizob2828 bizob2828 self-assigned this Feb 17, 2023

'use strict'

// Polyfill till we drop support for Node 14
Copy link
Member

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?

Copy link
Contributor Author

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

lib/instrumentation/core/http.js Show resolved Hide resolved
test/versioned/express/helpers/request.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants