Skip to content
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

Grafana dashboard #448

Open
vitobotta opened this issue Dec 9, 2024 · 10 comments
Open

Grafana dashboard #448

vitobotta opened this issue Dec 9, 2024 · 10 comments

Comments

@vitobotta
Copy link

Hi! Is there a ready dashboard for Grafana to display metrics regarding SolidQueue?

@rosa
Copy link
Member

rosa commented Dec 9, 2024

Hey @vitobotta, no, not for Solid Queue, but there's this one for Active Job.

@vitobotta
Copy link
Author

Thanks @rosa! Tried it, but didn't work out since I'm using Prometheus Exporter rather than Yabeda. Guess I'll need to find another solution.

One option is to use Postgres directly as a source for Grafana and just run queries on the SolidQueue tables. However, there's no column that shows job duration. How can I figure out job durations then?

I really want to track job durations over time and spot the slowest jobs. Any ideas?

Thanks!

@rosa
Copy link
Member

rosa commented Dec 9, 2024

Ahhhh, not really. You can check finished_at and compare it with scheduled_at, but that would include the time waiting in the queue. Active Job instrumentation events are much better but they're not tracked in the DB, you'd need to subscribe to them somewhere, publish the metrics and create a custom collector to collect them 🤔

@vitobotta
Copy link
Author

Got it, thanks for sharing your thoughts. I will definitely check out the instrumentation options.

By the way, are there any future plans to expose additional details or metrics with SolidQueue?

@rosa
Copy link
Member

rosa commented Dec 9, 2024

No specific plans besides the instrumentation that already exists but I'm definitely open to ideas there!

@vitobotta
Copy link
Author

I see, thanks. Would be awesome to see some built in support for this in the future :)

@amirali-ashraf
Copy link

Hi!

No specific plans besides the instrumentation that already exists but I'm definitely open to ideas there!

Do you think if we can implement some controllers in the library so it can fetch the metrics from the database and then we would be able to make a UI on top of that? I think that would be the first step.

@rosa
Copy link
Member

rosa commented Dec 31, 2024

@amirali-ashraf, could that perhaps live in https://github.com/rails/mission_control-jobs? Since that has controllers and specific code to query Active Job's queues and jobs 🤔

@amirali-ashraf
Copy link

@rosa let me have a look and get back to you!

@amirali-ashraf
Copy link

@rosa so, you are completely right! I have missed this library for a long time 🤷‍♂️ https://github.com/rails/mission_control-jobs

With this API and tools like https://grafana.com/docs/plugins/yesoreyeram-infinity-datasource/latest/ @vitobotta probably can we get the info we want to be added to grafana?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants