diff options
author | Erik Johnston <erik@matrix.org> | 2018-07-23 13:21:15 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-07-23 13:21:15 +0100 |
commit | 0b0b24cb82d3337bef5d3dd4b960990934d8d5c5 (patch) | |
tree | 3cbf0143b30ef340a91a99f5d491ee2eb7aa5e8c /synapse/http/request_metrics.py | |
parent | Update docs/workers.rst (diff) | |
parent | Merge pull request #3520 from matrix-org/matthew/sync_deleted_devices (diff) | |
download | synapse-0b0b24cb82d3337bef5d3dd4b960990934d8d5c5.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/client_apis_move
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 ) |