Skip to content
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

Scheduled tasks should emit log lines with timings like HTTP requests do #17217

Closed
reivilibre opened this issue May 18, 2024 · 0 comments · Fixed by #17219
Closed

Scheduled tasks should emit log lines with timings like HTTP requests do #17217

reivilibre opened this issue May 18, 2024 · 0 comments · Fixed by #17219

Comments

@reivilibre
Copy link
Contributor

https://element-hq.github.io/synapse/latest/usage/administration/request_log.html?highlight=log%20line#request-log-format is very useful for HTTP requests, but for things that go into a background job, or into a task scheduled by the task scheduler, you don't get such statistics.

A somewhat 'obvious' and likely very useful enhancement would be to have a very similar log line describing completed tasks.

reivilibre added a commit that referenced this issue May 22, 2024
…atabase usage. (#17219)

The log format is the same as the request log format, except:

- fields that are specific to HTTP requests have been removed
- the task's params are included at the end of the log line.

These log lines are emitted:
- when the task function finishes — both completion and failure (and I
suppose it is possible for a task to become schedulable again?)
- every 5 minutes whilst it is running

Closes #17217.

---------

Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
H-Shay pushed a commit to H-Shay/hq_synapse that referenced this issue May 31, 2024
…atabase usage. (element-hq#17219)

The log format is the same as the request log format, except:

- fields that are specific to HTTP requests have been removed
- the task's params are included at the end of the log line.

These log lines are emitted:
- when the task function finishes — both completion and failure (and I
suppose it is possible for a task to become schedulable again?)
- every 5 minutes whilst it is running

Closes element-hq#17217.

---------

Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
Mic92 pushed a commit to Mic92/synapse that referenced this issue Jun 14, 2024
…atabase usage. (element-hq#17219)

The log format is the same as the request log format, except:

- fields that are specific to HTTP requests have been removed
- the task's params are included at the end of the log line.

These log lines are emitted:
- when the task function finishes — both completion and failure (and I
suppose it is possible for a task to become schedulable again?)
- every 5 minutes whilst it is running

Closes element-hq#17217.

---------

Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant