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

[24.0] Add middleware for logging start and end of request #18046

Merged
merged 3 commits into from
Apr 24, 2024

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Apr 23, 2024

Configurable via use_access_logging_middleware.
Looks like this:

galaxy.webapps.base.api DEBUG 2024-04-23 17:14:43,776 [pN:main,p:73562,tN:MainThread] GET /history/current_history_json?since=2024-04-22T17:24:13.936493 f8c75e2c-30eb-4fcb-9b96-25bd4b2df435
galaxy.webapps.base.api DEBUG 2024-04-23 17:14:48,719 [pN:main,p:73562,tN:MainThread] GET /history/current_history_json?since=2024-04-22T17:24:13.936493 f8c75e2c-30eb-4fcb-9b96-25bd4b2df435 200
galaxy.webapps.base.api DEBUG 2024-04-23 17:14:51,767 [pN:main,p:73562,tN:MainThread] GET /history/current_history_json?since=2024-04-22T17:24:13.936493 2fe6094c-67bb-4144-a19f-cbb4a1b18fb4
galaxy.webapps.base.api DEBUG 2024-04-23 17:14:51,786 [pN:main,p:73562,tN:MainThread] GET /history/current_history_json?since=2024-04-22T17:24:13.936493 2fe6094c-67bb-4144-a19f-cbb4a1b18fb4 200
galaxy.webapps.base.api DEBUG 2024-04-23 17:14:53,139 [pN:main,p:73562,tN:MainThread] GET /api/entry_points?running=true 763693e9-4fd3-4a97-a100-a3c259b4b4c8

Should help catch requests that are either long running or consume a lot of memory.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

Configurable via `use_access_logging_middleware`.
Looks like this:

```
galaxy.webapps.base.api DEBUG 2024-04-23 17:14:43,776 [pN:main,p:73562,tN:MainThread] GET /history/current_history_json?since=2024-04-22T17:24:13.936493 f8c75e2c-30eb-4fcb-9b96-25bd4b2df435
galaxy.webapps.base.api DEBUG 2024-04-23 17:14:48,719 [pN:main,p:73562,tN:MainThread] GET /history/current_history_json?since=2024-04-22T17:24:13.936493 f8c75e2c-30eb-4fcb-9b96-25bd4b2df435 200
galaxy.webapps.base.api DEBUG 2024-04-23 17:14:51,767 [pN:main,p:73562,tN:MainThread] GET /history/current_history_json?since=2024-04-22T17:24:13.936493 2fe6094c-67bb-4144-a19f-cbb4a1b18fb4
galaxy.webapps.base.api DEBUG 2024-04-23 17:14:51,786 [pN:main,p:73562,tN:MainThread] GET /history/current_history_json?since=2024-04-22T17:24:13.936493 2fe6094c-67bb-4144-a19f-cbb4a1b18fb4 200
galaxy.webapps.base.api DEBUG 2024-04-23 17:14:53,139 [pN:main,p:73562,tN:MainThread] GET /api/entry_points?running=true 763693e9-4fd3-4a97-a100-a3c259b4b4c8
```
@dannon dannon merged commit 21a57d2 into galaxyproject:release_24.0 Apr 24, 2024
49 checks passed
@martenson martenson deleted the access_logging_middleware branch April 24, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants