File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,6 @@ const (
115
115
MemoryUsedStack = CadenceMetricsPrefix + "memory-used-stack"
116
116
NumGoRoutines = CadenceMetricsPrefix + "num-go-routines"
117
117
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 "
120
120
)
Original file line number Diff line number Diff line change @@ -253,7 +253,9 @@ func (bw *baseWorker) runPoller() {
253
253
return
254
254
case <- bw .pollerRequestCh :
255
255
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 )))
257
259
if bw .sessionTokenBucket != nil {
258
260
bw .sessionTokenBucket .waitForAvailableToken ()
259
261
}
You can’t perform that action at this time.
0 commit comments