pgbouncer_exporter icon indicating copy to clipboard operation
pgbouncer_exporter copied to clipboard

Please add new pgbouncer-v1.21.0 metrics related to prepared statements

Open ale-dd opened this issue 1 year ago • 2 comments

It would be great if someone could kindly cut a new release including the new pgbouncer-v1.21.0 metrics related to prepared statements.

I would be happy to submit a simple PR but in order to do so I would first have to go through some painful bureaucratic hoops. Hope you understand and I don't come across as entitled brat... :-)

Thank you!

ale-dd avatar Nov 18 '23 01:11 ale-dd

If you could provide more documentation on the feature that would help anyone willing to implement. What are the queries, what is the output format of the queries, what the metrics mean. Links to documentation would also help.

Note, the Prometheus project uses the DCO for attestation of contribution and does not have a CLA. So there are no company agreements to sign.

SuperQ avatar Nov 18 '23 14:11 SuperQ

Starting with pgbouncer 1.21.0, there is a new prepared_statements field in SHOW SERVERS: https://www.pgbouncer.org/usage.html#show-servers

I do not think that SHOW SERVERS stats are returned at the moment (only DATABASES, POOLS and CLIENTS), but it could be a nice addition to expose the other stats from this command when adding support for prepared statements stats.

It would be useful to also expose the max_prepared_statements configuration setting to be able to graph how much of the prepared statements cache is used.

renchap avatar Feb 12 '24 13:02 renchap