Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Build Status Code Climate Gem Version

Chillout gem tracks your ActiveRecord models statistics. You can see the metrics for your application in a grafana dashboard. Please visit for more details.


Add this line to your Rails application's Gemfile:

gem 'chillout'

And then execute:

$ bundle

And add following line to config/environments/production.rb with your own SECRET_KEY:

config.chillout = { secret: 'SECRET_KEY' }

And that's all!


chillout gem is automatically tracking your model creations. Remember you have to be in production environment - otherwise chillout gem will NOT track your metrics.

Custom metrics

You can use Chillout::Metric.track('custom_name') to track a custom metric. It's quite useful when you want to track a certain business process, like:

# in 'new':

# in 'create':

We encourage you to ship your own class (Adapter) which encapsulates this global constant and it's closer to your application's domain.

Advanced custom metrics

For more advanced tracking which supports multiple values, multiple tags and custom timestamps use Chillout::Metric.push:

  series: "purchases",
  tags: {
    country: "USA",
    terminal: "KATE-123",
  values: {
    number_of_products: 4,
    total_amount: 55.70,
    tax: 5.70,
  • tags, timestamp and values are optional.
  • Tag keys and values should be strings (or symbols).
  • Make sure that given values types are consistent. Avoid sending total_amount: 55.70 in one metric and total_amount: 60 in another. Always convert to same class such as Float, Integer or String.

Different strategy

By default chillout uses a background thread to send metrics in a non-blocking way. However, if you prefer it can use active_job and the adapter you configured for it ie. sidekiq, resque, delayed_job, etc.

config.chillout = {secret: 'secret', strategy: :active_job}

This feature is available since Rails 4.2


Chillout gem is tested using Travis CI. You can check it to get insight about which versions of Rails and Rubies are actually supported. We provide listeners for ActiveRecord.


Running complete test suite:

bundle install
bundle exec rake bundle
bundle exec rake test