diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-04-28 12:31:26 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-04-28 12:31:26 +0100 |
commit | 1a12766e3bfe76681af9ef88cbb6fbf22bb50500 (patch) | |
tree | c416f93bcdb93c813fdd9e6b57566ea14d0565ef /synapse | |
parent | Check if report_metrics is True (diff) | |
download | synapse-1a12766e3bfe76681af9ef88cbb6fbf22bb50500.tar.xz |
Add a comment explaining why automatic metric reporting is disabled for JsonResource
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/http/server.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py index 2c131a7017..29241fa145 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -214,6 +214,10 @@ class JsonResource(HttpServer, resource.Resource): self._async_render(request) return server.NOT_DONE_YET + # Disable metric reporting because _async_render does its own metrics. + # It does its own metric reporting because _async_render dispatches to + # a callback and it's the class name of that callback we want to report + # against rather than the JsonResource itself. @request_handler(report_metrics=False) @defer.inlineCallbacks def _async_render(self, request): |