-
Notifications
You must be signed in to change notification settings - Fork 186
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
feat(multi-region): metrics for knex for all regional databases #3580
Conversation
- add 'region' label
- this change collapses both into initialize, and adds checks to ensure initialization is done before being updated for new regions
@@ -24,14 +24,14 @@ export default function (app: express.Express) { | |||
register: prometheusClient.register, | |||
collectionPeriodMilliseconds: highFrequencyMetricsCollectionPeriodMs(), | |||
config: { | |||
knex | |||
getDbClients: getAllRegisteredDbClients |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could get all clients from the config and then this would not rely on any DB state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to get metrics for databases that are not yet registered and being used?
Especially if we start introducing alerting in the future around some of these metrics, we'd have alerts on potentially unused databases.
Description & motivation
Part of https://linear.app/speckle/issue/WEB-2142/multi-region-db-connection-health
Metrics on knex queries and connection pools are gathered and made available as Prometheus metrics.
These are updated to gather data on all knex clients for all multi-region databases.
This PR updates the server component only; fileimport-service, preview-service, and webhook-service will be updated in later PRs
Changes:
To-do before merge:
Screenshots:
Validation of changes:
Checklist:
References