diff options
author | Eric Eastwood <erice@element.io> | 2022-08-23 02:47:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 08:47:30 +0100 |
commit | 9385c41ba4fd9cbc86d074ff8fa69e2ae437eb88 (patch) | |
tree | 475b666ad5ad8ca2cb3ab6cf36aed6b8b6d12a97 /synapse/rest/client/room.py | |
parent | `synapse.api.auth.Auth` cleanup: make permission-related methods use `Request... (diff) | |
download | synapse-9385c41ba4fd9cbc86d074ff8fa69e2ae437eb88.tar.xz |
Fix Prometheus metrics being negative (mixed up start/end) (#13584)
Fix: - https://github.com/matrix-org/synapse/pull/13535#discussion_r949582508 - https://github.com/matrix-org/synapse/pull/13533#discussion_r949577244
Diffstat (limited to 'synapse/rest/client/room.py')
-rw-r--r-- | synapse/rest/client/room.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/rest/client/room.py b/synapse/rest/client/room.py index 0eafbae457..3259de4802 100644 --- a/synapse/rest/client/room.py +++ b/synapse/rest/client/room.py @@ -116,9 +116,13 @@ messsages_response_timer = Histogram( 2.5, 5.0, 10.0, + 20.0, 30.0, 60.0, + 80.0, + 100.0, 120.0, + 150.0, 180.0, "+Inf", ), @@ -674,7 +678,7 @@ class RoomMessageListRestServlet(RestServlet): room_member_count = await make_deferred_yieldable(room_member_count_deferred) messsages_response_timer.labels( room_size=_RoomSize.from_member_count(room_member_count) - ).observe((processing_start_time - processing_end_time) / 1000) + ).observe((processing_end_time - processing_start_time) / 1000) return 200, msgs |