Skip to content

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
bug/tushar/error_logging_issuefrom
copilot/implement-request-timeout-handling
Open

Implement request timeout handling, improve error logging, harden delivery failure recovery, and bump version to 3.3.9#186
durlabhjain with Copilot wants to merge 3 commits into
bug/tushar/error_logging_issuefrom
copilot/implement-request-timeout-handling

Conversation

Copilot AI commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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

  • Added per-request timeout support for the HTTP transport (timeoutMs, default 10s).
  • Removed noisy success-only logging from the log-shipping transport.
  • Kept error logging for failed batch and single-log deliveries without crashing the stream.
  • Added a fallback path for failed batched sends so each log is retried individually.
  • Updated JSDoc for the timeout option and refined the transport behavior for production reliability.
  • Added focused regression coverage for timeout and batch-fallback handling.
  • Bumped the package version to 3.3.9.

Copilot AI and others added 2 commits September 1, 2026 17:02
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
Copilot AI requested a review from durlabhjain September 1, 2026 17:05
@durlabhjain
durlabhjain marked this pull request as ready for review September 1, 2026 17:14
Copilot AI lite review requested due to automatic review settings September 1, 2026 17:14
@durlabhjain durlabhjain removed their assignment Sep 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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.

Comment thread lib/pino-http-send.mjs
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