File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,6 @@ const (
115115 MemoryUsedStack = CadenceMetricsPrefix + "memory-used-stack"
116116 NumGoRoutines = CadenceMetricsPrefix + "num-go-routines"
117117
118- ConcurrentTaskQuota = CadenceMetricsPrefix + "concurrent-task-quota"
119- ConcurrentTaskRunning = CadenceMetricsPrefix + "concurrent-task-running "
118+ ConcurrentTaskQuota = CadenceMetricsPrefix + "concurrent-task-quota"
119+ PollerRequestBufferUsage = CadenceMetricsPrefix + "poller-request-buffer-usage "
120120)
Original file line number Diff line number Diff line change @@ -253,7 +253,9 @@ func (bw *baseWorker) runPoller() {
253253 return
254254 case <- bw .pollerRequestCh :
255255 bw .metricsScope .Gauge (metrics .ConcurrentTaskQuota ).Update (float64 (cap (bw .pollerRequestCh )))
256- bw .metricsScope .Gauge (metrics .ConcurrentTaskRunning ).Update (float64 (cap (bw .pollerRequestCh ) - len (bw .pollerRequestCh )))
256+ // This metric is used to monitor how many poll requests have been allocated
257+ // and can be used to approximate number of concurrent task running (not pinpoint accurate)
258+ bw .metricsScope .Gauge (metrics .PollerRequestBufferUsage ).Update (float64 (cap (bw .pollerRequestCh ) - len (bw .pollerRequestCh )))
257259 if bw .sessionTokenBucket != nil {
258260 bw .sessionTokenBucket .waitForAvailableToken ()
259261 }
You can’t perform that action at this time.
0 commit comments