-
Notifications
You must be signed in to change notification settings - Fork 416
Instrument encode_response with tracing in Sliding Sync requests
#18815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instrument encode_response with tracing in Sliding Sync requests
#18815
Conversation
encode_response in Sliding Sync requestsencode_response with tracing in Sliding Sync requests
| set_tag( | ||
| SynapseTags.FUNC_ARG_PREFIX + "events.length", | ||
| str(len(events)), | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matches the pattern we use elsewhere
synapse/synapse/storage/databases/main/events_worker.py
Lines 664 to 667 in 5c20a60
| set_tag( | |
| SynapseTags.FUNC_ARG_PREFIX + "event_ids.length", | |
| str(len(event_ids)), | |
| ) |
|
|
||
| return 200, response_content | ||
|
|
||
| @trace_with_opname("sliding_sync.encode_response") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matches what we're doing for legacy /sync
synapse/synapse/rest/client/sync.py
Line 293 in 5c20a60
| @trace_with_opname("sync.encode_response") |
|
Thanks for the review @erikjohnston 🐖 |
Instrument
encode_responsewith tracing in Sliding Sync requestsJust filling in the hole I see in the trace after
current_sync_for_user. In this case, I know that it was probably just serializing all ~133k state events I requested for the Matrix HQ room.The hole at the end after
encode_json_responseis already tracked by #17722 and we're adding tracing for it in #18804Dev notes
Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.