diff options
author | Erik Johnston <erikj@jki.re> | 2018-09-14 16:40:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-14 16:40:31 +0100 |
commit | 8b3652831c743cec300015ea72f1590c209e53ad (patch) | |
tree | 9ee8b4037458427073a475ad200c426e8b3a798c /synapse/http | |
parent | Merge pull request #3860 from matrix-org/travis/typo-1 (diff) | |
parent | Remove spurious comment (diff) | |
download | synapse-8b3652831c743cec300015ea72f1590c209e53ad.tar.xz |
Merge pull request #3871 from matrix-org/erikj/in_flight_block_metrics
Add in flight real time metrics for Measure blocks
Diffstat (limited to 'synapse/http')
-rw-r--r-- | synapse/http/matrixfederationclient.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py index c49dbacd93..c3542b9353 100644 --- a/synapse/http/matrixfederationclient.py +++ b/synapse/http/matrixfederationclient.py @@ -43,6 +43,7 @@ from synapse.api.errors import ( from synapse.http.endpoint import matrix_federation_endpoint from synapse.util import logcontext from synapse.util.logcontext import make_deferred_yieldable +from synapse.util.metrics import Measure logger = logging.getLogger(__name__) outbound_logger = logging.getLogger("synapse.http.outbound") @@ -224,9 +225,11 @@ class MatrixFederationHttpClient(object): reactor=self.hs.get_reactor() ) request_deferred.addTimeout(_sec_timeout, self.hs.get_reactor()) - response = yield make_deferred_yieldable( - request_deferred, - ) + + with Measure(self.clock, "outbound_request"): + response = yield make_deferred_yieldable( + request_deferred, + ) log_result = "%d %s" % (response.code, response.phrase,) break |