Skip to content
Snippets Groups Projects
Unverified Commit fcfb591b authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Fix outbound federation request metrics (#6795)

parent cc109b79
No related branches found
No related tags found
No related merge requests found
Fix outbound federation request metrics.
...@@ -408,6 +408,8 @@ class MatrixFederationHttpClient(object): ...@@ -408,6 +408,8 @@ class MatrixFederationHttpClient(object):
_sec_timeout, _sec_timeout,
) )
outgoing_requests_counter.labels(method_bytes).inc()
try: try:
with Measure(self.clock, "outbound_request"): with Measure(self.clock, "outbound_request"):
# we don't want all the fancy cookie and redirect handling # we don't want all the fancy cookie and redirect handling
...@@ -440,6 +442,8 @@ class MatrixFederationHttpClient(object): ...@@ -440,6 +442,8 @@ class MatrixFederationHttpClient(object):
response.phrase.decode("ascii", errors="replace"), response.phrase.decode("ascii", errors="replace"),
) )
incoming_responses_counter.labels(method_bytes, response.code).inc()
set_tag(tags.HTTP_STATUS_CODE, response.code) set_tag(tags.HTTP_STATUS_CODE, response.code)
if 200 <= response.code < 300: if 200 <= response.code < 300:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment