Repository navigation
fix(daemon): log delivery failures dropped without a DLQ sink - #615
Merged
Merged
Conversation
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.
Fixes #586.
When a sink exhausted its retries and
--dlqwas unset (the default), the daemon counted the dropped result and logged"DLQ entry counted but no sink configured"once, atdebug. Every later dropped alert left only a counter increment.Changes
warnwhen no DLQ sink is configured. The first drop warns immediately; later drops are folded into at most one warning every 10 seconds, carrying adroppedcount and the last error, and any remainder is flushed on shutdown.rsigma_dlq_write_failures_totalcounter, next to the existing warning.rsigma-runtime's delivery worker log a failure they could not queue instead of discarding the send result.deliverymodule docs,DeliveryFailure,Dispatcher::spawn,cli/engine/daemon.md, andguide/nats-streaming.md. The--dlqflag docs now say what happens to parse failures and delivery failures when it is unset.Tests
delivery_failures_without_dlq_log_one_rate_limited_warning(daemon integration): three events go to an unreachable webhook with no--dlq, and the test asserts exactly oneWARNline withdropped: 1and the delivery error once all three failures are counted. It fails onmain.dropped_failure_warnings_are_rate_limitedunit-tests the interval and flush logic with explicit instants.terminal_failure_with_closed_dlq_counts_and_ackscovers the runtime path where the DLQ receiver is gone.DaemonProcessin the CLI test helpers now keeps the daemon's stderr lines so tests can assert on logs.