parent
50f4612c72
commit
63a8b197e4
1 changed files with 4 additions and 1 deletions
|
@ -53,7 +53,10 @@ def time_after_request(name, metric_queue):
|
|||
|
||||
metric_queue.put('ResponseTime', dur, dimensions=dims, unit='Seconds')
|
||||
metric_queue.put('ResponseCode', r.status_code, dimensions=dims)
|
||||
if r.status_code < 200 or r.status_code >= 300:
|
||||
|
||||
if r.status_code >= 500:
|
||||
metric_queue.put('5XXResponse', 1, dimensions={'name': name})
|
||||
elif r.status_code < 200 or r.status_code >= 300:
|
||||
metric_queue.put('Non200Response', 1, dimensions={'name': name})
|
||||
|
||||
return r
|
||||
|
|
Reference in a new issue