Provide more context in logs for connection and request handling#567
Provide more context in logs for connection and request handling#567peter-leonov-ch merged 23 commits intomainfrom
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
3821d7a to
345d241
Compare
345d241 to
575de7d
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves Node.js client observability around HTTP keep-alive socket/request lifecycle by adding stable per-connection/per-request identifiers to logs, and extends integration tests to cover several tricky connection failure modes (timeouts, dropped connections, malformed responses).
Changes:
- Add
connectionId,requestId, andsocketIdcontext to debug/trace/warn/error logs in the Node base connection implementation. - Expand integration tests to simulate connection drops and verify surfaced error behavior.
- Relax logger-support assertions to tolerate the new log message format; add a changelog entry.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
packages/client-node/src/connection/node_base_connection.ts |
Introduces connection/request/socket IDs and enriches request/socket lifecycle logs with this context. |
packages/client-node/__tests__/integration/node_socket_handling.test.ts |
Refactors timeout permutation test and adds TCP-level “dropped/malformed response” scenarios. |
packages/client-node/__tests__/integration/node_logger_support.test.ts |
Updates assertions to match the new log message format (regex-based). |
CHANGELOG.md |
Adds an entry describing enhanced request/socket lifecycle logging. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/client-node/__tests__/integration/node_socket_handling.test.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/client-node/__tests__/integration/node_socket_handling.test.ts
Outdated
Show resolved
Hide resolved
packages/client-node/__tests__/integration/node_socket_handling.test.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Waiting on:
command()#520Summary
Checklist
Delete items not relevant to your PR: