diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-10-22 20:19:40 +0200 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-10-22 20:19:40 +0200 |
commit | c7503f8f335bda84a2c40b659a409df05538868d (patch) | |
tree | 8844135554b54605a14287f63a5fe5a0959b0ad8 /synapse/http/request_metrics.py | |
parent | fix missing import and run isort (diff) | |
parent | Use recaptcha_ajax.js directly from Google (diff) | |
download | synapse-c7503f8f335bda84a2c40b659a409df05538868d.tar.xz |
merge in master
Diffstat (limited to 'synapse/http/request_metrics.py')
-rw-r--r-- | synapse/http/request_metrics.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/http/request_metrics.py b/synapse/http/request_metrics.py index f24b4b949c..588e280571 100644 --- a/synapse/http/request_metrics.py +++ b/synapse/http/request_metrics.py @@ -38,7 +38,8 @@ outgoing_responses_counter = Counter( ) response_timer = Histogram( - "synapse_http_server_response_time_seconds", "sec", ["method", "servlet", "tag"] + "synapse_http_server_response_time_seconds", "sec", + ["method", "servlet", "tag", "code"], ) response_ru_utime = Counter( @@ -171,11 +172,13 @@ class RequestMetrics(object): ) return - outgoing_responses_counter.labels(request.method, str(request.code)).inc() + response_code = str(request.code) + + outgoing_responses_counter.labels(request.method, response_code).inc() response_count.labels(request.method, self.name, tag).inc() - response_timer.labels(request.method, self.name, tag).observe( + response_timer.labels(request.method, self.name, tag, response_code).observe( time_sec - self.start ) |