mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-03 00:54:47 -04:00
Improve tracing for to device messages (#9686)
This commit is contained in:
parent
bb0fe02a52
commit
33548f37aa
7 changed files with 102 additions and 19 deletions
|
@ -29,6 +29,7 @@ from synapse.api.presence import UserPresenceState
|
|||
from synapse.events import EventBase
|
||||
from synapse.federation.units import Edu
|
||||
from synapse.handlers.presence import format_user_presence_state
|
||||
from synapse.logging.opentracing import SynapseTags, set_tag
|
||||
from synapse.metrics import sent_transactions_counter
|
||||
from synapse.metrics.background_process_metrics import run_as_background_process
|
||||
from synapse.types import ReadReceipt
|
||||
|
@ -557,6 +558,13 @@ class PerDestinationQueue:
|
|||
contents, stream_id = await self._store.get_new_device_msgs_for_remote(
|
||||
self._destination, last_device_stream_id, to_device_stream_id, limit
|
||||
)
|
||||
for content in contents:
|
||||
message_id = content.get("message_id")
|
||||
if not message_id:
|
||||
continue
|
||||
|
||||
set_tag(SynapseTags.TO_DEVICE_MESSAGE_ID, message_id)
|
||||
|
||||
edus = [
|
||||
Edu(
|
||||
origin=self._server_name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue