summary refs log tree commit diff
path: root/synapse/http/servlet.py
diff options
context:
space:
mode:
authorJorik Schellekens <joriksch@gmail.com>2019-07-24 13:07:35 +0100
committerGitHub <noreply@github.com>2019-07-24 13:07:35 +0100
commitcf2972c818344214244961e6175f559a6b59123b (patch)
treed1a3c4b3a2f2b3e3b1dfcbea88cdf5be75c199ef /synapse/http/servlet.py
parentMake changelog slightly more readable (diff)
downloadsynapse-cf2972c818344214244961e6175f559a6b59123b.tar.xz
Fix servlet metric names (#5734)
* Fix servlet metric names

Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Remove redundant check

* Cover all return paths
Diffstat (limited to 'synapse/http/servlet.py')
-rw-r--r--synapse/http/servlet.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/http/servlet.py b/synapse/http/servlet.py
index 889038ff25..f0ca7d9aba 100644
--- a/synapse/http/servlet.py
+++ b/synapse/http/servlet.py
@@ -290,11 +290,13 @@ class RestServlet(object):
 
             for method in ("GET", "PUT", "POST", "OPTIONS", "DELETE"):
                 if hasattr(self, "on_%s" % (method,)):
+                    servlet_classname = self.__class__.__name__
                     method_handler = getattr(self, "on_%s" % (method,))
                     http_server.register_paths(
                         method,
                         patterns,
-                        trace_servlet(self.__class__.__name__, method_handler),
+                        trace_servlet(servlet_classname, method_handler),
+                        servlet_classname,
                     )
 
         else: