diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2022-12-06 09:52:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-06 09:52:55 +0000 |
commit | cb59e080627745d089d073d9dac276362d9abaf6 (patch) | |
tree | 53043ef70d583929c21a774b2449ee8711f6ffce /tests/handlers/test_appservice.py | |
parent | Better return type for `get_all_entities_changed` (#14604) (diff) | |
download | synapse-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 '')
-rw-r--r-- | tests/handlers/test_appservice.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/handlers/test_appservice.py b/tests/handlers/test_appservice.py index 9ed26d87a7..57bfbd7734 100644 --- a/tests/handlers/test_appservice.py +++ b/tests/handlers/test_appservice.py @@ -765,7 +765,12 @@ class ApplicationServicesHandlerSendEventsTestCase(unittest.HomeserverTestCase): fake_device_ids = [f"device_{num}" for num in range(number_of_messages - 1)] messages = { self.exclusive_as_user: { - device_id: to_device_message_content for device_id in fake_device_ids + device_id: { + "type": "test_to_device_message", + "sender": "@some:sender", + "content": to_device_message_content, + } + for device_id in fake_device_ids } } |