It has been a long road for Trifle. It first came up as a performance monitoring app for Rails applications. I think deep down I just didn’t feel it and wanted it to become something more. Analytics in different area. I remember meeting AppSignal guys in WebSummit 2015 and we were kinda in same space. They are now doing pretty great and I’m even using their service for one of the projects.

After a rewrite to Elixir/Phoenix I’ve decided to make it universal. Heading towards Prometheus/Grafana direction. I started lacking time to work on frontend area and through just to open it as an API. But that never happened.

This year I started working on different project in Browser automation area. As work continued, there was a clear need for analytics in place. Instead of using 3rd party service, I’ve decided to use what I learned while building Trifle and instead of turning it into its own service, I decided to take the core of it and release it as an OpenSource ruby gem. We’ve been using it over last couple months and added bunch of improvements. Elixir version is next. Coz why not.

So instead of building an API service, Trifle::Stats is a gem that allows you to store/persist statistics for your Rails app in various databases. For example Redis, Postgress and MongoDB. Then retrieve these as aggregated values for specific time span and range. Think of it as hourly values from 8am until 5pm.

And I didn’t stop there.

Another big part of the app I’m working on is custom stored logger output. We trace bunch of ruby code during browser automation and then store this in a database. Kinda like a CI/CD execution. This includes bunch of text output, return values from specific commands, screenshots, videos, links to related objects and whatever else you could imagine. I extracted this into Trifle::Trace.

There is one more part that I was planning to open up. Storing Environment variables in database in encrypted form. Fortunatelly Rails came up with their own approach so this is not gonna be needed. I may still open it up tho. It’s always good to have more options.

So yea, thats the current state. Instead of Trifle becoming API (and who knows, maybe one day it will still be). I’ve opensourced it and let it live its own life. Maybe this way it will help more people. These are fairly small and simple tools that adds large value into your app.

You can find more at