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

Add postgresql metrics logging #2799

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GradedJestRisk
Copy link
Contributor

Problem

Database metrics are scarce and ephemeral. We definitely need more of them offline.
Check this blog post.

Solution

Add these in log drain, using Scalingo API

@GradedJestRisk GradedJestRisk changed the title [doc][postgresql] add database metrics logging Add postgresql metrics logging Sep 20, 2024

### Logging database statistics

Database default's log drain will not contain query statistics, which are ephemeral. Plus, you have a limited time to troubleshoot runnings queries, which may not be convenient. To log them and other statistics, such as query statistics, slow queries, database I/O and CPU, you can use our [API](https://developers.scalingo.com/databases/metrics) and log them by yourself using [a scheduler](https://doc.scalingo.com/platform/app/task-scheduling/scalingo-scheduler). An open-source example is [available here](https://doc.scalingo.com/platform/app/task-scheduling/scalingo-scheduler), although not provided by Scalingo itself.

Choose a reason for hiding this comment

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

@GradedJestRisk did you intend for that last link to go to https://github.com/1024pix/pix-db-stats ?

Copy link
Contributor Author

@GradedJestRisk GradedJestRisk Sep 20, 2024

Choose a reason for hiding this comment

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

Sure ! I fixed it.

@GradedJestRisk GradedJestRisk force-pushed the postgresql-log-database-statistics branch from 04cf232 to 1055f36 Compare September 20, 2024 14:44
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.

2 participants