Skip to content

Provide more context in logs for connection and request handling#567

Merged
peter-leonov-ch merged 23 commits intomainfrom
better_user_experience_with_connection_hangup
Feb 25, 2026
Merged

Provide more context in logs for connection and request handling#567
peter-leonov-ch merged 23 commits intomainfrom
better_user_experience_with_connection_hangup

Conversation

@peter-leonov-ch
Copy link
Copy Markdown
Collaborator

@peter-leonov-ch peter-leonov-ch commented Feb 23, 2026

Waiting on:

Summary

  • adding tests to cover for the tricky connection related situations
  • augment logs with context required for debugging

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 91.42857% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...client-node/src/connection/node_base_connection.ts 91.42% 1 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@peter-leonov-ch peter-leonov-ch force-pushed the better_user_experience_with_connection_hangup branch 2 times, most recently from 3821d7a to 345d241 Compare February 23, 2026 20:27
@peter-leonov-ch peter-leonov-ch force-pushed the better_user_experience_with_connection_hangup branch from 345d241 to 575de7d Compare February 24, 2026 08:56
@peter-leonov-ch peter-leonov-ch changed the title [DRAFT] Better user experience with connection hangup Provide more context in logs for connection and request handling Feb 24, 2026
@peter-leonov-ch peter-leonov-ch marked this pull request as ready for review February 24, 2026 15:52
Copilot AI review requested due to automatic review settings February 24, 2026 15:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and socketId context 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

mshustov
mshustov previously approved these changes Feb 24, 2026
@peter-leonov-ch peter-leonov-ch merged commit fd23dd7 into main Feb 25, 2026
49 checks passed
@peter-leonov-ch peter-leonov-ch deleted the better_user_experience_with_connection_hangup branch February 25, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants