Parent: #1936
Problem
gittensory_jobs_deferred_total is registered as a persisted gauge in src/server.ts (reading backend.queue.stats()["gittensory_jobs_deferred_total"]) but no code path anywhere in sqlite-queue.ts or pg-queue.ts ever calls recordQueueMetric(driver, "gittensory_jobs_deferred_total", ...) — dead instrumentation that always reports 0.
A Grafana panel or alert built on gittensory_jobs_deferred_total_persisted_total will show a flat 0 forever, giving a false sense that no deferrals are happening. The similarly-named (and actually incremented) metrics gittensory_jobs_rate_limit_deferred_total / gittensory_jobs_rate_limit_admission_deferred_total / gittensory_jobs_rate_limit_budget_deferred_total exist and ARE recorded, so this looks like a leftover/renamed metric from an earlier iteration rather than something intentionally deferred.
Fix
Either:
- Wire
recordQueueMetric(driver, "gittensory_jobs_deferred_total") at the actual deferral call sites it was meant to cover, OR
- Remove the dead gauge registration from
src/server.ts (both the main registration loop and the pre-seed loop) so the metric list only reflects series that are actually written.
Verification
Parent: #1936
Problem
gittensory_jobs_deferred_totalis registered as a persisted gauge insrc/server.ts(readingbackend.queue.stats()["gittensory_jobs_deferred_total"]) but no code path anywhere insqlite-queue.tsorpg-queue.tsever callsrecordQueueMetric(driver, "gittensory_jobs_deferred_total", ...)— dead instrumentation that always reports 0.A Grafana panel or alert built on
gittensory_jobs_deferred_total_persisted_totalwill show a flat 0 forever, giving a false sense that no deferrals are happening. The similarly-named (and actually incremented) metricsgittensory_jobs_rate_limit_deferred_total/gittensory_jobs_rate_limit_admission_deferred_total/gittensory_jobs_rate_limit_budget_deferred_totalexist and ARE recorded, so this looks like a leftover/renamed metric from an earlier iteration rather than something intentionally deferred.Fix
Either:
recordQueueMetric(driver, "gittensory_jobs_deferred_total")at the actual deferral call sites it was meant to cover, ORsrc/server.ts(both the main registration loop and the pre-seed loop) so the metric list only reflects series that are actually written.Verification
gittensory_jobs_deferred_totalstill has zero write call sites against currentsrc/(line numbers may have shifted).