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

Added flask-monitoringdashboard app #438

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

iambibhas
Copy link
Contributor

Implemented flask-monitoringdashboard This app gives us some metrics about HTTP requests on the endpoints we choose. Couple of pros are -

  • it's possible to track requests per user with this if the user is logged in
  • it's possible to track request time per endpoint per version with this. The version could be a manually set version number or the deployed git commit ID. So it's possible to compare endpoint performance per release.

screen shot 2018-04-23 at 10 15 41 am

screen shot 2018-04-23 at 10 56 30 am

screen shot 2018-04-23 at 10 56 45 am

screen shot 2018-04-23 at 11 49 30 am

@jace
Copy link
Member

jace commented Apr 23, 2018

What is the performance impact of this extension?

@iambibhas
Copy link
Contributor Author

@jace it writes to a second db. I tried load testing locally using ab, didn't find much difference in performance. Any better way to measure that you can think of? This seems to be essentially what the clients for 3rd party services do. They make HTTP requests and this is writing to db.

@jace
Copy link
Member

jace commented Apr 23, 2018

When does it write? In the same request response cycle, or in a background job? Writing to a second db will still freeze the request until the database finishes committing.

@@ -25,3 +25,5 @@ hasjob/static/gen
*.gz
*.bz2
hasjob/assets/node_modules
admindash-config.cfg
flask_monitoringdashboard.db
Copy link
Member

Choose a reason for hiding this comment

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

We can't use SQLite in production as there are multiple worker processes competing for control over this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By default it uses sqlite and creates this file. I moved it to postgres.

@@ -25,3 +25,5 @@ hasjob/static/gen
*.gz
*.bz2
hasjob/assets/node_modules
admindash-config.cfg
Copy link
Member

Choose a reason for hiding this comment

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

Config should be stored in the instance folder.

return 'anon'


dashboard.config.get_group_by = get_user_id
Copy link
Member

Choose a reason for hiding this comment

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

Group by event session, not user.

@iambibhas iambibhas changed the title Added flask admindashboard app Added flask-monitoringdashboard app Apr 30, 2018
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants