-
-
Notifications
You must be signed in to change notification settings - Fork 728
Add a custom LL metrics prometheus collector #1150
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 a custom LL metrics prometheus collector #1150
Conversation
cee2d0a
to
dea3e74
Compare
Finally got around to confirming it worked.
|
is there a specific reason you chose |
These are basically my understanding of it. |
as far as I am aware we don't need custom collectors |
By using a custom collector we can separate this logic from application logic, as well as also having the actual metrics being only updated on demand. For values like uptimeMs, memory stats, cpu load, etc, it makes sense to update them at scrape time. It also ensures that the metrics endpoint is serving the most up to date data. |
alright that is true, there is one other issue which should be addressed before this can be merged since load will be incorrect if you call the metrics too often then Ideally we would cache the load & frame stats inbetween calls unless a certain time has passed |
LavalinkServer/src/main/java/lavalink/server/metrics/LavalinkStatsCollector.kt
Outdated
Show resolved
Hide resolved
LavalinkServer/src/main/java/lavalink/server/metrics/LavalinkStatsCollector.kt
Outdated
Show resolved
Hide resolved
LavalinkServer/src/main/java/lavalink/server/metrics/LavalinkStatsCollector.kt
Outdated
Show resolved
Hide resolved
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.
this should target dev
rebase your changes please
8808f85
to
8e906b2
Compare
closes: #760
WIP to add a custom Prometheus collector for the custom LL metrics. I am going to be pretty busy all weekend but I thought I would throw this up sooner rather than later.
I haven't had time to test as I am going to bed and then will be busy for the weekend. If someone would build it and test it feel free, otherwise I will sometime early next week.