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

Commit

Permalink
add event id to logcontext when handling incoming PDUs (#10936)
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Sep 29, 2021
1 parent 94b620a commit 176aa55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/10936.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Include the event id in the logcontext when handling PDUs received over federation.
5 changes: 4 additions & 1 deletion synapse/federation/federation_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,10 @@ async def _process_incoming_pdus_in_room_inner(
async with lock:
logger.info("handling received PDU: %s", event)
try:
await self._federation_event_handler.on_receive_pdu(origin, event)
with nested_logging_context(event.event_id):
await self._federation_event_handler.on_receive_pdu(
origin, event
)
except FederationError as e:
# XXX: Ideally we'd inform the remote we failed to process
# the event, but we can't return an error in the transaction
Expand Down

0 comments on commit 176aa55

Please sign in to comment.