feat(http): refactor node:http client instrumentation for portability#20393
Open
feat(http): refactor node:http client instrumentation for portability#20393
Conversation
1f9cef2 to
5ab332a
Compare
Contributor
size-limit report 📦
|
18b93f6 to
fd04ed5
Compare
This was implemented for the portable Express integration, but others will need the same functionality, so make it a reusable util.
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
Refactor the `node:http` outgoing request instrumentation so that it can be applied to non-Node.js environments by patching the http module. Also, refactor so that the diagnostics_channel and monkeypatching paths can share code, and so that light and normal node-core instrumentations can share more of the functionality as well. To facilitate this, some portable minimal types are vendored in from the `node:http` module.
0877c6e to
1963717
Compare
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
Refactor the `node:http` outgoing request instrumentation so that it can be applied to non-Node.js environments by patching the http module. Also, refactor so that the diagnostics_channel and monkeypatching paths can share code, and so that light and normal node-core instrumentations can share more of the functionality as well. To facilitate this, some portable minimal types are vendored in from the `node:http` module.
1963717 to
3e7001c
Compare
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
Refactor the `node:http` outgoing request instrumentation so that it can be applied to non-Node.js environments by patching the http module. Also, refactor so that the diagnostics_channel and monkeypatching paths can share code, and so that light and normal node-core instrumentations can share more of the functionality as well. To facilitate this, some portable minimal types are vendored in from the `node:http` module.
0307e3a to
640f8f0
Compare
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
Refactor the `node:http` outgoing request instrumentation so that it can be applied to non-Node.js environments by patching the http module. Also, refactor so that the diagnostics_channel and monkeypatching paths can share code, and so that light and normal node-core instrumentations can share more of the functionality as well. To facilitate this, some portable minimal types are vendored in from the `node:http` module.
1b8377c to
1a8d51e
Compare
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
…ttp client instrumentation (#20393)
isaacs
added a commit
that referenced
this pull request
Apr 20, 2026
Refactor the `node:http` outgoing request instrumentation so that it can be applied to non-Node.js environments by patching the http module. Also, refactor so that the diagnostics_channel and monkeypatching paths can share code, and so that light and normal node-core instrumentations can share more of the functionality as well. To facilitate this, some portable minimal types are vendored in from the `node:http` module.
953b012 to
1ef480a
Compare
isaacs
added a commit
that referenced
this pull request
Apr 21, 2026
Refactor the `node:http` outgoing request instrumentation so that it can be applied to non-Node.js environments by patching the http module. Also, refactor so that the diagnostics_channel and monkeypatching paths can share code, and so that light and normal node-core instrumentations can share more of the functionality as well. To facilitate this, some portable minimal types are vendored in from the `node:http` module.
1ef480a to
13607f2
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 13607f2. Configure here.
Refactor the `node:http` outgoing request instrumentation so that it can be applied to non-Node.js environments by patching the http module. Also, refactor so that the diagnostics_channel and monkeypatching paths can share code, and so that light and normal node-core instrumentations can share more of the functionality as well. To facilitate this, some portable minimal types are vendored in from the `node:http` module.
13607f2 to
d8d225c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Refactor the
node:httpoutgoing request instrumentation so that it canbe applied to non-Node.js environments by patching the http module.
Also, refactor so that the diagnostics_channel and monkeypatching paths
can share code, and so that light and normal node-core instrumentations
can share more of the functionality as well.
To facilitate this, some portable minimal types are vendored in from the
node:httpmodule.yarn lint) & (yarn test).Closes #issue_link_here