File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -614,7 +614,9 @@ func (me *Metrics) RecordRequest(labels Labels) {
614
614
}
615
615
616
616
// Request size by endpoint
617
- me .RequestSizeByEndpoint [GetEndpointFromRequestType (labels .RType )].Update (int64 (labels .RequestSize ))
617
+ if labels .RequestSize > 0 {
618
+ me .RequestSizeByEndpoint [GetEndpointFromRequestType (labels .RType )].Update (int64 (labels .RequestSize ))
619
+ }
618
620
619
621
// Handle the account metrics now.
620
622
am := me .getAccountMetrics (labels .PubID )
Original file line number Diff line number Diff line change @@ -675,10 +675,12 @@ func (m *Metrics) RecordRequest(labels metrics.Labels) {
675
675
requestStatusLabel : string (labels .RequestStatus ),
676
676
}).Inc ()
677
677
678
- endpoint := metrics .GetEndpointFromRequestType (labels .RType )
679
- m .requestsSize .With (prometheus.Labels {
680
- requestEndpointLabel : string (endpoint ),
681
- }).Observe (float64 (labels .RequestSize ))
678
+ if labels .RequestSize > 0 {
679
+ endpoint := metrics .GetEndpointFromRequestType (labels .RType )
680
+ m .requestsSize .With (prometheus.Labels {
681
+ requestEndpointLabel : string (endpoint ),
682
+ }).Observe (float64 (labels .RequestSize ))
683
+ }
682
684
683
685
if labels .CookieFlag == metrics .CookieFlagNo {
684
686
m .requestsWithoutCookie .With (prometheus.Labels {
You can’t perform that action at this time.
0 commit comments