@@ -53,6 +53,7 @@ type Exporter struct {
5353
5454 // App metrics.
5555 appQueue * prometheus.Desc
56+ appGroupQueue * prometheus.Desc
5657 appProcsSpawning * prometheus.Desc
5758
5859 // Process metrics.
@@ -110,6 +111,12 @@ func NewExporter(cmd string, timeout time.Duration) *Exporter {
110111 []string {"name" },
111112 nil ,
112113 ),
114+ appGroupQueue : prometheus .NewDesc (
115+ prometheus .BuildFQName (namespace , "" , "app_group_queue" ),
116+ "Number of requests in app group process queues." ,
117+ []string {"default" },
118+ nil ,
119+ ),
113120 appProcsSpawning : prometheus .NewDesc (
114121 prometheus .BuildFQName (namespace , "" , "app_procs_spawning" ),
115122 "Number of processes spawning." ,
@@ -159,6 +166,8 @@ func (e *Exporter) Collect(ch chan<- prometheus.Metric) {
159166 ch <- prometheus .MustNewConstMetric (e .appQueue , prometheus .GaugeValue , parseFloat (sg .RequestsInQueue ), sg .Name )
160167 ch <- prometheus .MustNewConstMetric (e .appProcsSpawning , prometheus .GaugeValue , parseFloat (sg .Group .ProcessesSpawning ), sg .Name )
161168
169+ ch <- prometheus .MustNewConstMetric (e .appGroupQueue , prometheus .GaugeValue , parseFloat (sg .Group .GetWaitListSize ), sg .Group .Default )
170+
162171 // Update process identifiers map.
163172 processIdentifiers = updateProcesses (processIdentifiers , sg .Group .Processes )
164173 for _ , proc := range sg .Group .Processes {
@@ -214,6 +223,7 @@ func (e *Exporter) Describe(ch chan<- *prometheus.Desc) {
214223 ch <- e .currentProcessCount
215224 ch <- e .appCount
216225 ch <- e .appQueue
226+ ch <- e .appGroupQueue
217227 ch <- e .appProcsSpawning
218228 ch <- e .requestsProcessed
219229 ch <- e .procStartTime
0 commit comments