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

Feature request: per-statement-type counters #729

Open
n-oden opened this issue Apr 23, 2024 · 0 comments
Open

Feature request: per-statement-type counters #729

n-oden opened this issue Apr 23, 2024 · 0 comments

Comments

@n-oden
Copy link

n-oden commented Apr 23, 2024

Is your feature request related to a problem? Please describe.

A minor blocker for us in considering migrating to pgcat from pgpool-II is that pgpool exposes per-backend counters for statement types, e.g. SELECT, INSERT, UPDATE etc, and we have built a number of dashboards and alerting policies based on this, especially for detection of routing issues and badly formed queries.

https://www.pgpool.net/docs/43/en/html/sql-show-pool-backend-stats.html

Describe the solution you'd like

I think the obvious way to approach this would be to add a type label to the servers_query_count metric, populating it with the statement type.

As a sidebar here: servers_query_count is defined as a gauge in https://github.com/postgresml/pgcat/blob/main/src/prometheus.rs#L133-L136 which seems wrong? At the very least the help text should probably explain why a metric named foo_count is not of a counter type.

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