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

Update request log format documentation to mention the format used when the authenticated user is controlling another user. #13794

Merged
merged 3 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/13794.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update request log format documentation to mention the format used when the authenticated user is controlling another user.
4 changes: 2 additions & 2 deletions docs/usage/administration/request_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ See the following for how to decode the dense data available from the default lo

| Part | Explanation |
| ----- | ------------ |
| AAAA | Timestamp request was logged (not recieved) |
| AAAA | Timestamp request was logged (not received) |
| BBBB | Logger name (`synapse.access.(http\|https).<tag>`, where 'tag' is defined in the `listeners` config section, normally the port) |
| CCCC | Line number in code |
| DDDD | Log Level |
| EEEE | Request Identifier (This identifier is shared by related log lines)|
| FFFF | Source IP (Or X-Forwarded-For if enabled) |
| GGGG | Server Port |
| HHHH | Federated Server or Local User making request (blank if unauthenticated or not supplied) |
| HHHH | Federated Server or Local User making request (blank if unauthenticated or not supplied).<br/>If this is of the form `@aaa:example.com|@bbb:example.com`, then that means that `@aaa:example.com` is authenticated but they are controlling `@bbb:example.com`. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this only cover an admin puppetting a user via the API, or are there other examples? (Appservices?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appservices don't seem to, however the server can in some cases impersonate users in which case that is specified as an authenticated entity however those wouldn't correspond to any request lines because they're all internal.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'd be tempted to add a snippet says: "e.g. if aaa is controlling bbb via the admin API" and linking to the relevant docs.

But you might consider that overkill. I'll leave it to your discretion!

| IIII | Total Time to process the request |
| JJJJ | Time to send response over network once generated (this may be negative if the socket is closed before the response is generated)|
| KKKK | Userland CPU time |
Expand Down