-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Collect statement metrics & samples from all databases on host #9252
Conversation
4c5bcd2
to
92819bb
Compare
6657ac8
to
2f3f9fe
Compare
35a136e
to
7488cf4
Compare
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.
Nice! Have we considered preventing all other collection from the instance that runs this feature?
4544097
to
be13787
Compare
Update the collection of postgres statement metrics & samples to automatically collect data for all databases on a host. Changes: * collection of statement metrics & samples now respects the `dbstrict` setting * in order to be able to collect telemetry from multiple databases the statement sampler thread now maintains a collection pool with one connection per database * added a new `ignore_databases` configuration to enable users to define which databases on the host will be ignored. It defaults to the same exclusion list that was previously hardcoded in the "instance metrics" query. This setting is now shared across the whole check (instance metrics, statement metrics, statement samples) Follow-up to #8627 Motivation: * Simplify configuration for collection of statement metrics, samples & execution plans for users by enabling collection from all databases on a host with only a single configured "check instance." Previously users had to enumerate each database in a host separately. * Ensure that collection of statement samples & plans respects the `dbstrict` setting
be13787
to
60258a3
Compare
Co-authored-by: Ofek Lev <[email protected]>
Summary from offline discussion: the intended deployment configuration for the postgres check is to have only a single check instance for each postgres host. That one check instance will collect data from all databases on the host by default. If a user decides to configure multiple check instances for different databases on the same host then it's expected that there will be duplicate data collected by the check instances. In that case the user will need to set |
Remove the incorrect `db` tag inherited from the check instance tags from postgres DBM statement metrics & FQT events. This tag needs to be excluded because statement metrics & FQT events are collected from all databases on the host as of #9252. DBM statement samples are already doing the right thing here.
Remove the incorrect `db` tag inherited from the check instance tags from postgres DBM statement metrics & FQT events. This tag needs to be excluded because statement metrics & FQT events are collected from all databases on the host as of #9252. DBM statement samples are already doing the right thing here.
Remove the incorrect `db` tag inherited from the check instance tags from postgres DBM statement metrics & FQT events. This tag needs to be excluded because statement metrics & FQT events are collected from all databases on the host as of #9252. DBM statement samples are already doing the right thing here.
What does this PR do?
Update the collection of postgres statement metrics & samples to automatically collect data for all databases on a host.
Changes:
dbstrict
settingignore_databases
configuration to enable users to define which databases on the host will be ignored. It defaults to the same exclusion list that was previously hardcoded in the "instance metrics" query. This setting is now shared across the whole check (instance metrics, statement metrics, statement samples)Follow-up to #8627
Motivation
dbstrict
settingReview checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached