Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 176aa55

Browse files
authored
add event id to logcontext when handling incoming PDUs (#10936)
1 parent 94b620a commit 176aa55

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

changelog.d/10936.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Include the event id in the logcontext when handling PDUs received over federation.

synapse/federation/federation_server.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,10 @@ async def _process_incoming_pdus_in_room_inner(
10081008
async with lock:
10091009
logger.info("handling received PDU: %s", event)
10101010
try:
1011-
await self._federation_event_handler.on_receive_pdu(origin, event)
1011+
with nested_logging_context(event.event_id):
1012+
await self._federation_event_handler.on_receive_pdu(
1013+
origin, event
1014+
)
10121015
except FederationError as e:
10131016
# XXX: Ideally we'd inform the remote we failed to process
10141017
# the event, but we can't return an error in the transaction

0 commit comments

Comments
 (0)