Tracking issue: Stabilizing network inspection in Node.js
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 283
Description
Related issue: https://github.com/nodejs/diagnostics/issues/75
Initial implementation: https://github.com/nodejs/node/pull/53593
This issue is for tracking the remaining work to make network inspection in Node.js stable and to provide a comprehensive debugging experience.
Network inspection features
- β - Implemented
- π« - No plan to implement at the moment
- π - Need further investigation or discussion
Basic information
| Feature | http |
https |
http2 |
fetch |
WebSocket |
|---|---|---|---|---|---|
| type | β #54156 | β #54156 | β #59611 | β #56488 | β #59404 |
| timestamp | β #53593 | β #53593 | β #59611 | β #56488 | β #59404 |
| error | β #54246 | β #54246 | β #59611 | β #56488 |
Related protocols:
Network.requestWillBeSentNetwork.responseReceivedNetwork.loadingFinishedNetwork.loadingFailedNetwork.webSocketCreatedNetwork.webSocketClosedNetwork.webSocketFrameError
Request details
The details of the request, such as the request body, cookies, and query parameters. The Network.Request object is used to represent the request. Some features such as referrerPolicy are only available in browser contexts.
| Feature | http |
https |
http2 |
fetch |
WebSocket |
|---|---|---|---|---|---|
| url | β #53593 | β #53593 | β #59611 | β #56488 | |
| method | β #53593 | β #53593 | β #59611 | β #56488 | |
| headers | β #54156 | β #54156 | β #59611 | β #56488 | |
| postData | π | π | β #60483 |
Related protocols:
Network.requestWillBeSentNetwork.websocketFrameSentNetwork.webSocketWillSendHandshakeRequest
π Response details
The details of the response, such as the response body, and headers. The Network.Response object is used to represent the response. Some features such as early hits are only available for browser contexts.
| Feature | http |
https |
http2 |
fetch |
WebSocket |
|---|---|---|---|---|---|
| url | β #54156 | β #54156 | β #59611 | β #56488 | |
| status | β #54156 | β #54156 | β #59611 | β #56488 | |
| headers | β #54156 | β #54156 | β #59611 | β #56488 | |
| mimeType | β #58192 | β #58192 | β #59611 | ||
| body | #60572 | #60572 | β #60483 | β #58001 |
[!CAUTION]
We can't consume the response body within thediagnostics_channelhook. We need to investigate how to handle the response body. (ref. https://github.com/nodejs/node/pull/53593#discussion_r1658039637)
Related protocols:
Network.responseReceivedNetwork.websocketFrameReceivedNetwork.webSocketHandshakeResponseReceived
π Request initiator
The initiator of the request, such as the script URL, the line number, and the stack trace. The Network.Initiator object is used to represent the initiator.
| Feature | http |
https |
http2 |
fetch |
WebSocket |
|---|---|---|---|---|---|
| initiator | β #56805 | β #56805 | β #59611 | β #56805 |
Related protocols:
Network.requestWillBeSentNetwork.webSocketCreated
π« Network conditions and throttling
The network conditions and throttling information of the request and response. The Network.emulateNetworkConditions command is used to emulate network conditions.
π« Security and authentication information
The security and authentication information of the request and response. The SecurityDetails object is used to represent the security details.
Others
If there are any other features that are not covered by the above categories, please let us know and we will add them to the list.
Node.js specific features
These are network inspection features specific to Node.js applications, including:
- Monitoring incoming requests: Track and inspect incoming HTTP/HTTPS requests to the Node.js server, including headers, body, and timing information.
- Monitoring outgoing responses: Track and inspect outgoing HTTP/HTTPS responses from the Node.js server, including headers, body, and timing information.
These features are not available in the browser context. We plan to support these features in collaboration with the ChromeDevTools team. To move forward with the implementation, we will create a design doc for these features and discuss the specs with the ChromeDevTools team.
Next steps
- Implement the remaining features ready for implementation in the table above
- Investigate the support for WebSocket inspection in Node.js
- Investigate the support for fetch inspection in Node.js
- Investigate the support for HTTP/2 inspection in Node.js
- Document the design doc for Node.js specific features to collaborate with the ChromeDevTools team.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up β it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the related diagnostics issue and the initial implementation pull request, then review the unchecked and investigation-marked entries in the feature tables. The issue does not name a specific file or test; completion would require selecting and implementing a remaining feature ready for work, or completing the stated investigation and design coordination.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- devtools, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100