-
Notifications
You must be signed in to change notification settings - Fork 754
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
Reduce cardinality of pg_stat_statements #765
Conversation
This will make the default example much safer for production use. |
d01fb17
to
659f474
Compare
I do not think this fixes #549 and would like to suggest another approach. This commit literally increases the cardinality further instead of reducing it:
Including
@SuperQ if you're intent on using
Also, just some general comments:
|
This configuration is taken from gitlab.com production. It is well tested and reasonable. If you don't want to use the use the query, you are free to remove it from the config file. Users with artificial constraints on series have to manage this. It's not the job of the exporters to do this for them. The goal of the exporters is to provide useful information. The whole point of this example is to expose per-query metrics. This is perfectly reasonable to do in many situations and provides valuable insight into applications. |
This is actually the opposite, this is actually the primary use case for this. Production databases with a high rate of queries where you need to track per-queryid efficiency trends over time. Most production uses have fairly stable queryid patterns, because the queryid is normalized without the parameters to the query. So |
Make the example queries.yaml `pg_stat_statements` query safer. * Select the top 10% of queries by total query time. * Only expose the top 100 queries by total query time. * Keep only the most useful metrics. * Comment out the example by default. Fixes: #549 Signed-off-by: SuperQ <superq@gmail.com>
659f474
to
e7f58a4
Compare
Ping @sysadmind |
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.
I think this change is fine. If users want something different this file is free for users to edit in their own deployments.
One thing I notice here is dropping the check for 'rdsadmin'. I think that's safe because we're no longer joining to pg_roles, but you seem more familiar with this code so just double check that this won't break RDS please.
Yes, I think we simplified things to not need the join. |
Make the example queries.yaml
pg_stat_statements
query safer.Fixes: #549