add gauges for queue free/active/inactive

This commit is contained in:
rootdarkarchon
2023-08-02 10:14:27 +02:00
parent 4024754b47
commit 255798c0c6
3 changed files with 9 additions and 0 deletions

View File

@@ -193,6 +193,9 @@ public class RequestQueueService : IHostedService
_queueProcessingSemaphore.Release();
}
_metrics.SetGaugeTo(MetricsAPI.GaugeQueueFree, _userQueueRequests.Count(c => c == null));
_metrics.SetGaugeTo(MetricsAPI.GaugeQueueActive, _userQueueRequests.Count(c => c != null && c.IsActive));
_metrics.SetGaugeTo(MetricsAPI.GaugeQueueInactive, _userQueueRequests.Count(c => c != null && !c.IsActive));
_metrics.SetGaugeTo(MetricsAPI.GaugeDownloadQueue, _queue.Count);
}
}