Simple solution for capturing business metrics

I have a game I use for training purposes, which I share with my community. It does not use a database.

I would like to capture some simple metrics on: how often is it played, how many people play in a game, what settings do they use, did they finish etc.

Does anyone know of a simple way of capturing these? At the moment I feel I either have to add a database (cost) or implement some log scraping approach (eew!). Does anyone do something similar, what approach do you use?

Thanks!

Tom

We provide a free metrics store (Prometheus) that might be useful here. See Metrics on Fly.

For visualization, you could use the free version of Grafana Cloud which should give you enough space to track simple metrics.

We actually do this for basic web metrics. It’s not great for capturing details about every URL on a site, but just adding a prometheus exporter for 10-15 things you care about works really well.

What framework did you build your game with?

Thank you both that sounds like what I need.

The game is built with elixir phoenix liveview.

Oh nice! We have an article just for you then: Monitoring Elixir Apps on Fly.io With Prometheus and PromEx · Fly

Well, not going so well. I decided to follow the Hooking Up Fly Metrics and I made it as far as: A Basic Fly Dashboard (I got a green connection check) when I get:

Templating

Failed to upgrade legacy queries Datasource named Fly Org was not found" inside Grafana.

I found “Fly Org” inside the provided json but after that I am not sure where to go. Does anyone have a pointer for this? Thanks

Did you set a data source up in Grafana? That dashboard is expecting a datasource named Fly Org, I think. If you named it something else you might need to tweak the JSON.

:man_facepalming: Thank you!

(Is there a way for me to suggest/write modifications to your docs to make this more obvious in future?)

You can submit PRs right over here: GitHub - superfly/docs