Skip to content

Add configurable timeout and failure handling for Logstash connections#38

Open
nicdavidson wants to merge 1 commit intodevelopfrom
feature/logstash-timeout-and-failure-handling
Open

Add configurable timeout and failure handling for Logstash connections#38
nicdavidson wants to merge 1 commit intodevelopfrom
feature/logstash-timeout-and-failure-handling

Conversation

@nicdavidson
Copy link
Contributor

  • Add configurable connection timeout (default 2 seconds) to prevent blocking when Logstash is unavailable
  • Add on_failure option with three modes:
    • 'ignore': Request proceeds, log message is lost (default, preserves existing behavior)
    • 'fail_request': Returns 503 error when logging fails (for compliance requirements)
    • 'fallback_file': Request proceeds, log message written to Laravel log
  • Fix Monolog 3.x compatibility: Handle Level enum in addition to integers
  • Add database migration for new timeout and on_failure config fields
  • Properly close socket connections in finally block
  • Add detailed debug/warning logging for connection diagnostics

- Add configurable connection timeout (default 2 seconds) to prevent
  blocking when Logstash is unavailable
- Add on_failure option with three modes:
  - 'ignore': Request proceeds, log message is lost (default, preserves
    existing behavior)
  - 'fail_request': Returns 503 error when logging fails (for compliance
    requirements)
  - 'fallback_file': Request proceeds, log message written to Laravel log
- Fix Monolog 3.x compatibility: Handle Level enum in addition to integers
- Add database migration for new timeout and on_failure config fields
- Properly close socket connections in finally block
- Add detailed debug/warning logging for connection diagnostics
@thekevinm thekevinm changed the base branch from master to develop January 20, 2026 03:10
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.

1 participant