Skip to content

Conversation

@PDT42
Copy link
Contributor

@PDT42 PDT42 commented Nov 26, 2025

This introduces a new observable counter queue.processing_failed. This metric is collected per instance, per tenant, per service and tracks the total number of times CAP failed at processing a scheduled task. This is different from cold_entries, which tracks the number of tasks that will no longer be retried.

The counter is incremented each time the attempts field of a given task is updated.

Considered Alternative Approaches:

  • Handling the {event}/#failed event

    ... is not an option since it will only be emitted once processing failed finally

  • Handling req.on('failed')

    is not an option, because the initial request on the queued service does not fail

  • Calculating processing_failed based on incoming_messages and outgoing_messages

    ... is not an option because we allow to set attempts to maxAttempts manually for unrecoverable failures

  • Calculating AND handling {event}/#failed

    ... could be an option, but registering the handler for each individual event feels super messy

@PDT42 PDT42 marked this pull request as ready for review November 27, 2025 14:38
@PDT42 PDT42 requested a review from sjvans November 27, 2025 14:38
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.

2 participants