summary refs log tree commit diff
path: root/synapse/api/constants.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2022-12-06 09:52:55 +0000
committerGitHub <noreply@github.com>2022-12-06 09:52:55 +0000
commitcb59e080627745d089d073d9dac276362d9abaf6 (patch)
tree53043ef70d583929c21a774b2449ee8711f6ffce /synapse/api/constants.py
parentBetter return type for `get_all_entities_changed` (#14604) (diff)
downloadsynapse-cb59e080627745d089d073d9dac276362d9abaf6.tar.xz
Improve logging and opentracing for to-device message handling (#14598)
A batch of changes intended to make it easier to trace to-device messages through the system.

The intention here is that a client can set a property org.matrix.msgid in any to-device message it sends. That ID is then included in any tracing or logging related to the message. (Suggestions as to where this field should be documented welcome. I'm not enthusiastic about speccing it - it's very much an optional extra to help with debugging.)

I've also generally improved the data we send to opentracing for these messages.
Diffstat (limited to 'synapse/api/constants.py')
-rw-r--r--synapse/api/constants.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/api/constants.py b/synapse/api/constants.py
index bc04a0755b..89723d24fa 100644
--- a/synapse/api/constants.py
+++ b/synapse/api/constants.py
@@ -230,6 +230,9 @@ class EventContentFields:
     # The authorising user for joining a restricted room.
     AUTHORISING_USER: Final = "join_authorised_via_users_server"
 
+    # an unspecced field added to to-device messages to identify them uniquely-ish
+    TO_DEVICE_MSGID: Final = "org.matrix.msgid"
+
 
 class RoomTypes:
     """Understood values of the room_type field of m.room.create events."""