-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
database/sql: add DB connection diagnostics #24683
Comments
Related #18080 |
This issue in its current form does not have enough detail to be a proposal. If you want to describe a general area for improvement, please add an experience report instead. Otherwise, please describe the specific changes you would like to see, including the motivation or background, syntax or API signatures, and concrete examples (ideally drawn from experience reports). |
Sorry, I mislabeled it. I attempted to choose labels that conveyed "yes, I agree this would be good, we can track this separately, but I'm not sure how to best achieve this yet." |
I would be interested to specifically add the following stats:
@pjebs Would these statistics work for you? |
LGTM |
maybe for WaitCount and WaitTime, |
Couters play nice with systems like Prometheus and influx. We can derive averages from them at any interval. |
Some resources for future readers: |
Change https://golang.org/cl/108536 mentions this issue: |
Currently the
*DB
object (which represents a pool of connections) allows these settings:The aim of my proposal is to assist Go developers to tune these values.
Perhaps the
DBStats
object which currently only indicates how many open connections exist can indicate how many open connections are on average blocked and how long they are blocked for, for our typical application.That will allow us to perhaps set a higher
SetMaxOpenConns
value.The text was updated successfully, but these errors were encountered: