feat: add message retry and failure metrics tracking
Added metrics tracking for: - message_retries_total: Incremented when message retry is attempted - message_failures_total: Incremented when max retries reached or encryption fails Note: messages_queued metric is not applicable as this implementation sends messages directly without an explicit queue system.
This commit is contained in:
@@ -596,6 +596,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
||||
const nodes = (await Promise.all(encryptionPromises)).filter(node => node !== null) as BinaryNode[]
|
||||
|
||||
if (recipientJids.length > 0 && nodes.length === 0) {
|
||||
recordMessageFailure('send', 'encryption_failed')
|
||||
throw new Boom('All encryptions failed', { statusCode: 500 })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user