diff options
author | Erik Johnston <erik@matrix.org> | 2018-05-21 16:03:39 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-05-21 16:23:06 +0100 |
commit | dfa70adc33b8f058acae8a4f4f61a83f9fab47a7 (patch) | |
tree | 1bbb1143dfcf59a05acc10b7a5aa52664ad27970 /synapse/http/site.py | |
parent | Merge pull request #3241 from matrix-org/fix_user_visits_insertion (diff) | |
download | synapse-dfa70adc33b8f058acae8a4f4f61a83f9fab47a7.tar.xz |
Add in flight request metrics
This tracks CPU and DB usage while requests are in flight, rather than when we write the response.
Diffstat (limited to '')
-rw-r--r-- | synapse/http/site.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/http/site.py b/synapse/http/site.py index 202a990508..b608504225 100644 --- a/synapse/http/site.py +++ b/synapse/http/site.py @@ -85,7 +85,9 @@ class SynapseRequest(Request): def _started_processing(self, servlet_name): self.start_time = int(time.time() * 1000) self.request_metrics = RequestMetrics() - self.request_metrics.start(self.start_time, name=servlet_name) + self.request_metrics.start( + self.start_time, name=servlet_name, method=self.method, + ) self.site.access_logger.info( "%s - %s - Received request: %s %s", |