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

Instrument database calls made by CTMS #191

Open
jwhitlock opened this issue May 7, 2021 · 0 comments
Open

Instrument database calls made by CTMS #191

jwhitlock opened this issue May 7, 2021 · 0 comments

Comments

@jwhitlock
Copy link
Contributor

jwhitlock commented May 7, 2021

From #124 (comment):

What would be great to see in the next phase is instrumentation around any outgoing requests you have. I know the webapp talks to postgres, I'm less sure if it talks to other systems like Acoustic directly. For anything it does talk to, having a counter for the total requests and a histogram of response time, both broken down by success vs error, would be helpful for debugging.

A quick search finds https://pypi.org/project/query-exporter/, which seems to be designed for comparison of databases rather than monitoring database traffic. I think we'd need to write our own code, and use SQLAlchemy's hooks, similar to StatementWatcher in the CRUD tests.

My assumption is that the database is responsible for the bulk of the API request time, and the API errors, so API request timing is a first approximation of SQL query time.

┆Issue is synchronized with this Jira Task

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

No branches or pull requests

1 participant