summary refs log tree commit diff
path: root/synapse/rest/client/sync.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2024-08-08 11:27:23 +0100
committerErik Johnston <erik@matrix.org>2024-08-08 11:27:23 +0100
commit46c66aa8e79f67d86091ca809f48b36989fb06e5 (patch)
tree00eaf8c52093423267047b35d610c0fb42c02f66 /synapse/rest/client/sync.py
parentMerge remote-tracking branch 'origin/release-v1.113' into matrix-org-hotfixes (diff)
parentSSS: Implement PREVIOUSLY room tracking (#17535) (diff)
downloadsynapse-github/matrix-org-hotfixes.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes github/matrix-org-hotfixes matrix-org-hotfixes
Diffstat (limited to 'synapse/rest/client/sync.py')
-rw-r--r--synapse/rest/client/sync.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/rest/client/sync.py b/synapse/rest/client/sync.py

index 4f2c552af2..8c5db2a513 100644 --- a/synapse/rest/client/sync.py +++ b/synapse/rest/client/sync.py
@@ -899,6 +899,9 @@ class SlidingSyncRestServlet(RestServlet): body = parse_and_validate_json_object_from_request(request, SlidingSyncBody) # Tag and log useful data to differentiate requests. + set_tag( + "sliding_sync.sync_type", "initial" if from_token is None else "incremental" + ) set_tag("sliding_sync.conn_id", body.conn_id or "") log_kv( { @@ -912,6 +915,12 @@ class SlidingSyncRestServlet(RestServlet): "sliding_sync.room_subscriptions": list( (body.room_subscriptions or {}).keys() ), + # We also include the number of room subscriptions because logs are + # limited to 1024 characters and the large room ID list above can be cut + # off. + "sliding_sync.num_room_subscriptions": len( + (body.room_subscriptions or {}).keys() + ), } )