mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Fix outbound federation request metrics (#6795)
This commit is contained in:
parent
cc109b79dd
commit
fcfb591b31
1
changelog.d/6795.bugfix
Normal file
1
changelog.d/6795.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix outbound federation request metrics.
|
@ -408,6 +408,8 @@ class MatrixFederationHttpClient(object):
|
||||
_sec_timeout,
|
||||
)
|
||||
|
||||
outgoing_requests_counter.labels(method_bytes).inc()
|
||||
|
||||
try:
|
||||
with Measure(self.clock, "outbound_request"):
|
||||
# we don't want all the fancy cookie and redirect handling
|
||||
@ -440,6 +442,8 @@ class MatrixFederationHttpClient(object):
|
||||
response.phrase.decode("ascii", errors="replace"),
|
||||
)
|
||||
|
||||
incoming_responses_counter.labels(method_bytes, response.code).inc()
|
||||
|
||||
set_tag(tags.HTTP_STATUS_CODE, response.code)
|
||||
|
||||
if 200 <= response.code < 300:
|
||||
|
Loading…
Reference in New Issue
Block a user