diff options
author | Richard van der Hoff <richard@matrix.org> | 2023-10-27 15:21:58 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2023-10-27 15:21:58 +0100 |
commit | 4c586567f661745ffa0743e5611b68364af9c3c1 (patch) | |
tree | 0a7ba3803c56c055a1eda4762a37073c2e1b1426 | |
parent | `claim_local_one_time_keys`: pass in result object (diff) | |
download | synapse-4c586567f661745ffa0743e5611b68364af9c3c1.tar.xz |
Improve tracing for `claim_one_time_keys`
`set_tag` isn't really appropriate here, since we're logging an entire dict rather than something useful to search on. (Also, it will get truncated.) Use `log_kv` instead.
-rw-r--r-- | synapse/handlers/e2e_keys.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py index 5c356b0cff..7d44127ebf 100644 --- a/synapse/handlers/e2e_keys.py +++ b/synapse/handlers/e2e_keys.py @@ -682,8 +682,13 @@ class E2eKeysHandler: domain = get_domain_from_id(user_id) remote_queries.setdefault(domain, {})[user_id] = one_time_keys - set_tag("local_key_query", str(local_query)) - set_tag("remote_key_query", str(remote_queries)) + log_kv( + { + "message": "claiming one time keys", + "local query": local_query, + "remote queries, by server": remote_queries, + } + ) # A map of user ID -> device ID -> key ID -> key. json_result: Dict[str, Dict[str, Dict[str, JsonSerializable]]] = {} |