File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,6 @@ func (ch *ConcurrencyHandler) MonitorServerResponseCodes(resp *http.Response) in
148
148
ch .Metrics .Lock .Lock ()
149
149
defer ch .Metrics .Lock .Unlock ()
150
150
151
- // Reset error rates on successful response
152
151
if statusCode >= 200 && statusCode < 300 {
153
152
ch .Metrics .TotalRateLimitErrors = 0
154
153
ch .Metrics .TotalRetries = 0
@@ -164,6 +163,13 @@ func (ch *ConcurrencyHandler) MonitorServerResponseCodes(resp *http.Response) in
164
163
165
164
ch .Metrics .ResponseCodeMetrics .ErrorRate = errorRate
166
165
166
+ ch .logger .Debug ("Server Response Code Monitoring" ,
167
+ zap .Int ("StatusCode" , statusCode ),
168
+ zap .Float64 ("TotalRequests" , totalRequests ),
169
+ zap .Float64 ("TotalErrors" , totalErrors ),
170
+ zap .Float64 ("ErrorRate" , errorRate ),
171
+ )
172
+
167
173
if errorRate > ErrorRateThreshold {
168
174
return - 1
169
175
} else if errorRate <= ErrorRateThreshold && len (ch .sem ) < MaxConcurrency {
You can’t perform that action at this time.
0 commit comments