feat!: add prepared statement metrics#194
Merged
SuperQ merged 4 commits intoprometheus-community:masterfrom May 19, 2025
Merged
feat!: add prepared statement metrics#194SuperQ merged 4 commits intoprometheus-community:masterfrom
SuperQ merged 4 commits intoprometheus-community:masterfrom
Conversation
Signed-off-by: Sverre Boschman <1142569+sboschman@users.noreply.github.com>
Signed-off-by: Sverre Boschman <1142569+sboschman@users.noreply.github.com>
SuperQ
requested changes
May 17, 2025
Contributor
SuperQ
left a comment
There was a problem hiding this comment.
Thanks!
It seems like STATS_TOTALS was introduced in pgbouncer 1.8. Would you mind adding a note to the README that we now require >= 1.8
Signed-off-by: Sverre Boschman <1142569+sboschman@users.noreply.github.com>
SuperQ
approved these changes
May 19, 2025
SuperQ
added a commit
that referenced
this pull request
Jun 12, 2025
Notes: - This version changes the connection behavior to create a new client connection for each scrape. Previously a connection was created at startup. - This version now requires PgBouncer >= 1.8. * [CHANGE] Make connections per-scrape #214 * [FEATURE] Add prepared statement metrics #194 * [FEATURE] Add total_server_assignment_count metric #208 Signed-off-by: SuperQ <superq@gmail.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the
client_parse_count,server_parse_countandbind_countmetrics, which were introduced in PgBouncer 1.24 with #1192.Please note that for collecting the data we switched from the
SHOW STATScommand to theSHOW STATS_TOTALScommand. This command does not calculate the averages on the PgBouncer side, which we do not use in the exporter anyways. Saving a few PgBouncer cpu ticks.This means the metric prefix
pgbouncer_stats_has changed topgbouncer_stats_totals_, e.g.pgbouncer_stats_received_bytes_totalis nowpgbouncer_stats_totals_received_bytes_total.fixes #134
Tested with PgBouncer 1.20.1 and 1.24.0