Add option to disable printing stats to log#287
Closed
psapezhka wants to merge 2 commits intopgbouncer:masterfrom
Closed
Add option to disable printing stats to log#287psapezhka wants to merge 2 commits intopgbouncer:masterfrom
psapezhka wants to merge 2 commits intopgbouncer:masterfrom
Conversation
Member
|
In the way you have implemented it, if stats logging is disabled, we would still set the timer and compute all the stats but then just not print them. That seems wasteful. The effect of disabling this functionality should be that the timer is not set to begin with. You could also just set |
Author
|
Hello again. As I mentioned above, we are using stats in form of grafana dashboards. So stats are something that we need. But absolulty not in our logs. |
|
I see a reason in @psapezhko request - average stats are still needed to be counted but no need to log them, as external monitoring tool will collect them regularly. |
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.
Currently many of users of pgbouncer don't use logs to monitor it. For example we are using influxdb+grafana+custom-plugin to collect stats and display it to dashboard. So we absolutely don't need printing stats to log. So I added ability to disable this behavior(by default printing is on). Doc has been updated to. Additionally stats_period was moved from "Log settings" to "General setting" to reflect that this property means stats refreshing period - not only period of writing info to log.