-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add metrics of client #157
Conversation
src/libpgagroal/worker.c
Outdated
@@ -159,6 +163,9 @@ pgagroal_worker(int client_fd, char* address, char** argv) | |||
/* The slot may have been updated */ | |||
slot = client_io.slot; | |||
} | |||
|
|||
pgagroal_prometheus_client_active_sub(); | |||
pgagroal_prometheus_client_wait_add(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand where you are coming from.
However, I don't think we need to put client shutdown into the client_wait
category, since we are basically exiting shortly.
Hence we can remove client_wait_add()
from here
src/libpgagroal/worker.c
Outdated
@@ -242,6 +249,8 @@ pgagroal_worker(int client_fd, char* address, char** argv) | |||
pgagroal_log_debug("client disconnect: %d", client_fd); | |||
pgagroal_disconnect(client_fd); | |||
|
|||
pgagroal_prometheus_client_wait_sub(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Therefore we can move this to the else
Review my comments, squash, amend commit message with issue number, and force push |
Add the following metrics: * pgagroal_client_active * pgagroal_client_wait Close agroal#156
Done |
Thanks for your contribution ! |
Add the following metrics:
Close #156