Commit 121932f
fix: TRAC-1072 Seed idle queue gauges at zero instead of deleting
TRAC-1066 fixed cloudflare_queue_backlog_messages and related gauges
freezing at a stale non-zero value by calling DeletePartialMatch on
all 7 queue gauges before repopulating them each scrape. This
overcorrected: since Cloudflare's queueBacklogAdaptiveGroups and
queueConsumerMetricsAdaptiveGroups only emit rows for queues with
activity in the scrape window, an idle queue's series got wiped and
never repopulated, leaving Grafana with no data for hours at a time
instead of a correct zero baseline.
For the 3 gauges keyed only by queue_name/account (backlog messages,
backlog bytes, consumer concurrency), seed every currently known queue
at zero (from fetchQueueNames) immediately after the DeletePartialMatch
calls and before applying this scrape's real values. Idle queues now
read a continuous zero instead of disappearing. The 4 operation-metric
gauges keep the delete-only behavior since their action_type/outcome
label combinations aren't enumerable ahead of time.
Fixes TRAC-1072
Co-Authored-By: Claude <noreply@anthropic.com>1 parent b92e920 commit 121932f
1 file changed
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
815 | 815 | | |
816 | 816 | | |
817 | 817 | | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
| 818 | + | |
| 819 | + | |
822 | 820 | | |
823 | 821 | | |
824 | 822 | | |
| |||
827 | 825 | | |
828 | 826 | | |
829 | 827 | | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
830 | 847 | | |
831 | 848 | | |
832 | 849 | | |
| |||
0 commit comments