diff options
author | Erik Johnston <erik@matrix.org> | 2016-02-04 10:15:56 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-02-08 14:26:45 +0000 |
commit | 13e6262659fd544155875e18c0a3351c12d7651d (patch) | |
tree | f2c1d365e5c5abf8bc9dbe902a2cb6f2c85bb3bd /synapse/http | |
parent | Report the v1 and v2 patterns separately (diff) | |
download | synapse-13e6262659fd544155875e18c0a3351c12d7651d.tar.xz |
Add metrics to pushers
Diffstat (limited to 'synapse/http')
-rw-r--r-- | synapse/http/server.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py index c250a4604f..06935783ca 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -208,6 +208,9 @@ class JsonResource(HttpServer, resource.Resource): if request.method == "OPTIONS": self._send_response(request, 200, {}) return + + start_context = LoggingContext.current_context() + # Loop through all the registered callbacks to check if the method # and path regex match for path_entry in self.path_regexs.get(request.method, []): @@ -243,6 +246,13 @@ class JsonResource(HttpServer, resource.Resource): if context: tag = context.tag + if context != start_context: + logger.warn( + "Context have unexpectedly changed %r, %r", + context, self.start_context + ) + return + incoming_requests_counter.inc(request.method, servlet_classname, tag) response_timer.inc_by( |