mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-16 06:51:46 +01:00
Fix more typos in per-request metrics
This commit is contained in:
parent
dcfc10b129
commit
351b50a887
1 changed files with 5 additions and 4 deletions
|
@ -101,11 +101,12 @@ def wrap_request_handler(request_handler, report_metrics):
|
||||||
global _next_request_id
|
global _next_request_id
|
||||||
request_id = "%s-%s" % (request.method, _next_request_id)
|
request_id = "%s-%s" % (request.method, _next_request_id)
|
||||||
_next_request_id += 1
|
_next_request_id += 1
|
||||||
if report_metrics:
|
|
||||||
request_metrics = RequestMetrics()
|
|
||||||
request_metrics.start(self.clock)
|
|
||||||
|
|
||||||
with LoggingContext(request_id) as request_context:
|
with LoggingContext(request_id) as request_context:
|
||||||
|
if report_metrics:
|
||||||
|
request_metrics = RequestMetrics()
|
||||||
|
request_metrics.start(self.clock)
|
||||||
|
|
||||||
request_context.request = request_id
|
request_context.request = request_id
|
||||||
with request.processing():
|
with request.processing():
|
||||||
try:
|
try:
|
||||||
|
@ -307,7 +308,7 @@ class RequestMetrics(object):
|
||||||
if context:
|
if context:
|
||||||
tag = context.tag
|
tag = context.tag
|
||||||
|
|
||||||
if context != start_context:
|
if context != self.start_context:
|
||||||
logger.warn(
|
logger.warn(
|
||||||
"Context have unexpectedly changed %r, %r",
|
"Context have unexpectedly changed %r, %r",
|
||||||
context, self.start_context
|
context, self.start_context
|
||||||
|
|
Loading…
Reference in a new issue