mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 01:04:49 -04:00
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
This commit is contained in:
parent
8b0d5b171e
commit
cf2972c818
10 changed files with 92 additions and 31 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue