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.
This commit is contained in:
Richard van der Hoff 2023-10-27 15:21:58 +01:00
parent 27546ac171
commit 4c586567f6

View File

@ -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]]] = {}