summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-04-28 12:31:26 +0100
committerMark Haines <mark.haines@matrix.org>2016-04-28 12:31:26 +0100
commit1a12766e3bfe76681af9ef88cbb6fbf22bb50500 (patch)
treec416f93bcdb93c813fdd9e6b57566ea14d0565ef
parentCheck if report_metrics is True (diff)
downloadsynapse-1a12766e3bfe76681af9ef88cbb6fbf22bb50500.tar.xz
Add a comment explaining why automatic metric reporting is disabled for JsonResource
Diffstat (limited to '')
-rw-r--r--synapse/http/server.py4
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):