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
Base Prometheus metrics handler #1830
Conversation
Hey, sorry for the long delay! LGTM, just need to rebase with latest from master and I'll merge it right away. Thanks! |
Branch is now actual |
Thanks! |
hi! are there any plans to expand this to (say) count the number of users, albums, artists, tracks, etc? |
Thanks for the addition. How is this feature enabled with env vars? I need to add support for metrics to the helm chart but I'm not sure how the Go options correspond to env vars. Is |
I should add this to docs repository, definitely. To enable metrics:
UPD: PR with documentation updates: navidrome/website#96 |
Of course! It was my first PR to this project (and first PR to golang project), I tried to create it as small as possible. It has only required dependencies and configuration layer required by Prometheus to run. Next step is adding navidrome-specfic metrics. I have plans to do this in near future. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I want to add some standard metrics to navidrome. Prometheus metrics are useful for observability (including alerts).
I believe that many simple PRs are much better than 1 full.
What this PR has:
process_start_time_seconds
,go_threads
andprocess_cpu_seconds_total
I believe that metrics path is best approach, compare to different port or some auth, including HTTP Basic Auth:
/metrics
is the most simple way to protect them/metrics_super_secret_path
is simple to use and secure enough. The most serious problem in this case is plain HTTP connection over not secure connection which is not secure anyway.This relates to #1548 , but not solves initial request for now