summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-23 17:01:42 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-23 17:01:42 +0000
commitfea1e6fc73cbd7f3c2375a6b047bccaeeecaac51 (patch)
tree894e27921d633a8a441b9524edac0ff3af82ed6c
parentMerge pull request #6787 from matrix-org/rav/msc2260 (diff)
parentFix outbound federation request metrics (#6795) (diff)
downloadsynapse-fea1e6fc73cbd7f3c2375a6b047bccaeeecaac51.tar.xz
Fix outbound federation request metrics (#6795)
* commit 'fcfb591b3':
  Fix outbound federation request metrics (#6795)
-rw-r--r--changelog.d/6795.bugfix1
-rw-r--r--synapse/http/matrixfederationclient.py4
2 files changed, 5 insertions, 0 deletions
diff --git a/changelog.d/6795.bugfix b/changelog.d/6795.bugfix
new file mode 100644

index 0000000000..d1585653b1 --- /dev/null +++ b/changelog.d/6795.bugfix
@@ -0,0 +1 @@ +Fix outbound federation request metrics. diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 16765d54e0..6f1bb04d8b 100644 --- a/synapse/http/matrixfederationclient.py +++ b/synapse/http/matrixfederationclient.py
@@ -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: