Skip to content

add avg_wait_time and total_server_assignment_count metrics #208

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ulexus
Copy link

@Ulexus Ulexus commented May 9, 2025

Adds bindings for the avg_wait_time and total_server_assignment_count metrics, to provide better coverage of the latency in serving client requests.

@Ulexus Ulexus force-pushed the ulexus/avg_wait_time branch from 3740975 to 79d1589 Compare May 9, 2025 18:06
"total_xact_count": {COUNTER, "sql_transactions_pooled_total", 1, "Total number of SQL transactions pooled"},
"total_xact_time": {COUNTER, "server_in_transaction_seconds_total", 1e-6, "Total number of seconds spent by pgbouncer when connected to PostgreSQL in a transaction, either idle in transaction or executing queries"},
"database": {LABEL, "N/A", 1, "N/A"},
"avg_wait_time": {GAUGE, "avg_wait_seconds", 1e-6, "Average time spent by clients waiting for a server, in seconds, for the last stats period"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We explicitly don't include avg_wait_time since it's a lossy gauge and can be computed from total_wait_time.

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

Successfully merging this pull request may close these issues.

2 participants