@@ -102,6 +102,12 @@ func (p *ProcessesMetricGroup) getLatencyTags(processName string, process *model
102102 return tags
103103}
104104
105+ func (p * ProcessesMetricGroup ) getTagsWithPriority (processName string , process * models.Process , priority string ) map [string ]string {
106+ tags := p .getTags (processName , process )
107+ tags ["priority" ] = priority
108+ return tags
109+ }
110+
105111func (p * ProcessesMetricGroup ) getLatencyTagsWithPriority (processName string , process * models.Process , quantile string , priority string ) map [string ]string {
106112 tags := p .getLatencyTags (processName , process , quantile )
107113 tags ["priority" ] = priority
@@ -171,7 +177,12 @@ func (p *ProcessesMetricGroup) GetMetrics(status *models.FullStatus) {
171177 switch role .Role {
172178 case "grv_proxy" :
173179 if role .GrvLatencyStatistics != nil {
180+ grvCountScope := p .GetScopeOrExit ("grv" )
174181 grvLatScope := p .GetScopeOrExit ("grv_lat" )
182+ defaultCountTags := p .getTagsWithPriority (processName , & process , "default" )
183+ batchCountTags := p .getTagsWithPriority (processName , & process , "batch" )
184+ SetGauge (grvCountScope , "count" , defaultCountTags , role .GrvLatencyStatistics .Default .Count )
185+ SetGauge (grvCountScope , "count" , batchCountTags , role .GrvLatencyStatistics .Batch .Count )
175186 defaultMedianTags := p .getLatencyTagsWithPriority (processName , & process , "0.5" , "default" )
176187 batchMedianTags := p .getLatencyTagsWithPriority (processName , & process , "0.5" , "batch" )
177188 SetGauge (grvLatScope , "latency" , defaultMedianTags , role .GrvLatencyStatistics .Default .Median )
0 commit comments