diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-08 16:32:18 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-08 16:32:18 +0100 |
commit | 476899295f5fd6cff64799bcbc84cd4bf9005e33 (patch) | |
tree | cacce7f0de3c1b694cce8c805c21c297cfbdeb76 /synapse/http/client.py | |
parent | Merge branch 'master' of github.com:matrix-org/synapse into develop (diff) | |
download | synapse-476899295f5fd6cff64799bcbc84cd4bf9005e33.tar.xz |
Change the way we do logging contexts so that they survive divergences
Diffstat (limited to 'synapse/http/client.py')
-rw-r--r-- | synapse/http/client.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py index e8a5dedab4..5b3cefb2dc 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -14,6 +14,7 @@ # limitations under the License. from synapse.api.errors import CodeMessageException +from synapse.util.logcontext import preserve_context_over_fn from syutil.jsonutil import encode_canonical_json import synapse.metrics @@ -61,7 +62,10 @@ class SimpleHttpClient(object): # A small wrapper around self.agent.request() so we can easily attach # counters to it outgoing_requests_counter.inc(method) - d = self.agent.request(method, *args, **kwargs) + d = preserve_context_over_fn( + self.agent.request, + method, *args, **kwargs + ) def _cb(response): incoming_responses_counter.inc(method, response.code) |