Implement request timeout handling, improve error logging, harden delivery failure recovery, and bump version to 3.3.9 - #186
Open
durlabhjain with Copilot wants to merge 3 commits into
Conversation
Co-authored-by: durlabhjain <18685657+durlabhjain@users.noreply.github.com>
Co-authored-by: durlabhjain <18685657+durlabhjain@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement request timeout handling, improve error logging
Implement request timeout handling, improve error logging, harden delivery failure recovery, and bump version to 3.3.9
Sep 1, 2026
durlabhjain
marked this pull request as ready for review
September 1, 2026 17:14
durlabhjain
approved these changes
Sep 1, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Transport failure logging should include the error type (e.g., TimeoutError/AbortError) to keep operational diagnostics reliable and consistent with the PR’s stated goal of improved error logging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This pull request updates the pino-http-send transport to be more resilient and configurable in production by adding per-request timeouts, reducing noisy success logging, and preventing buffered log loss when batch delivery fails.
Changes:
- Added per-request timeout support (
timeoutMs, defaulting to 10s) for HTTP log delivery. - Hardened delivery so a failed batch send falls back to retrying each log individually (instead of dropping the buffer).
- Added regression tests covering batch-fallback behavior and timeout error handling.
File summaries
| File | Description |
|---|---|
lib/pino-http-send.mjs |
Implements timeout behavior and improves delivery reliability with batch-failure fallback plus consolidated failure logging. |
tests/pino-http-send-flush.test.mjs |
Adds coverage for batch-fallback delivery and timeout error logging without stream crashes. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Adds request timeout handling for the pino HTTP transport, documents the timeout option, and removes noisy success logging while preserving failure reporting on stderr. The delivery path is now hardened so failed batched sends retry each log individually instead of dropping the buffered payload, avoiding silent data loss during transport failures.
Changes
timeoutMs, default 10s).