diff options
author | Mark Haines <mjark@negativecurvature.net> | 2015-05-12 15:23:50 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2015-05-12 15:23:50 +0100 |
commit | a6fb2aa2a5a5837d77bed8813f9e59bfe6be8999 (patch) | |
tree | 154ff4598b9740104abd5cf465c98cf2797c5406 /synapse/http/client.py | |
parent | Merge pull request #149 from matrix-org/erikj/backfill (diff) | |
parent | Make distributer.fire work as it did (diff) | |
download | synapse-a6fb2aa2a5a5837d77bed8813f9e59bfe6be8999.tar.xz |
Merge pull request #144 from matrix-org/erikj/logging_context
Preserving logging contexts
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) |