Skip to content

Conversation

prestoalvarez
Copy link
Contributor

Summary

Fixes a metric leak in QueuedOutgoingMessages where the Gauge counter could become permanently inflated when sessions terminate with messages still queued.

Problem

The Gauge metric was only decremented on explicit pop_front() calls, but never when the queue was destroyed. If a session terminated with pending messages in the queue, the metric would remain artificially high indefinitely, causing:

  • Inaccurate monitoring data
  • Potential false alerts
  • Difficulty in diagnosing queue health

Solution

Added a Drop implementation for QueuedOutgoingMessages that decrements the gauge by the number of remaining messages when the struct is destroyed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

1 participant