-
Notifications
You must be signed in to change notification settings - Fork 229
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
Allow configuring metrics collection #518
Comments
I haven't really figured out any neat way. The per-database metrics are what I'd want to disable but keep the replica ones as they are aggregates. Promauto is very handy but it's also an anti-pattern for libraries when you want to control what metrics are being exported. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using Litestream as a library we found out that since
litestream.NewDB
exposes new promauto metrics there are a couple of issues. For one we can't disable metrics collection while we use Prometheus metrics within the main program so we're currently forced to expose per-database metrics.Other is that we hit an unexpected deadlock as it seems the go Prometheus module holds a global lock while scraping and if the scraper is locked out and new metrics are being added it will deadlock as it will access the same lock. Making it easier to configure metrics collection and not explicitly adding them in NewDB would be a good start.
The text was updated successfully, but these errors were encountered: