prometheus-community / pgbouncer_exporter

Prometheus exporter for PgBouncer
MIT License
140 stars 49 forks source link

Publish server/client cancel statistics. #144

Closed sshankar closed 6 months ago

sshankar commented 6 months ago

This adds cl_active_cancel_req, cl_waiting_cancel_req, sv_active_cancel and sv_being_canceled pool metrics to track client and server connections being cancelled.

type metric detail
pool/client cl_active_cancel_req Client connections that have forwarded query cancellations to the server and are waiting for the server response.
pool/client cl_waiting_cancel_req Client connections that have not forwarded query cancellations to the server yet.
pool/server sv_active_cancel Server connections that are currently forwarding a cancel request.
pool/server sv_being_canceled Servers that normally could become idle but are waiting to do so until all in-flight cancel requests have completed that were sent to cancel a query on this server.

Please see "show pools" under "Show commands" in https://www.pgbouncer.org/usage.html for details.