Tracking metrics in Rails apps

Hi,

New to this forum so if this is wrong place for this question please suggest an appropriate forum for general Rails questions before removing this post.

I’m exploring reporting options in a live Rails application. I have a dozen or so simple metrics like:

User.where('created_at > ?', 1.week.ago).count

I’d like to bundle them and present them ideally outside the Rails app itself though I could create a new model and view I’m wondering if there are external tools/dashboards that could quickly be set up to monitor a few key performance indicators? Or a route that could provide JSON for these metrics that another tool could pick up? Or simply append row to existing Google sheet (or similar)?

What are some modern approaches people are using to provide visibility into Rails applications?

Thanks for any suggestions!

I don’t personally know of any external tools or dashboards, but there might be one.

However, if I were to do it, I would do something kind of similar to this:

Except, if I were trying to access it externally, I’d make a new controller to output the data to JSON. Then retrieve it wherever needed.

Maybe blazer gem could help you. https://github.com/ankane/blazer

The other option is to expose those metrics through an API endpoint and consume it with Grafana.