Ruby Monitoring Quick Start Guide

Getting started with Instrumental and Ruby

Here's how to get up and running with Ruby application monitoring and Instrumental. Like all our agents, the Ruby agent is designed to prevent exceptions from impacting your application. It's also completely non-blocking.


Add the agent to your Gemfile:

gem 'instrumental_agent'

Be sure to Bundle install:

$ bundle install

Require the library and configure it with your project token. Using Rails? We recommend putting this in an initializer.

require 'instrumental_agent'

Automated Metrics with Metrician

When you install the Instrumental ruby agent, you also get Metrician, a tool that will automatically report metrics from your ruby application without having to configure anything. Read more about automated metric collection with Metrician.

Sending Custom Metrics

Increments are simple counters. learn more

I.increment('', 1)

Gauges represent a value at a point in time. learn more

I.gauge('', 234)

The time method measures code execution time.

I.time('') do
  post = Post.find(1)

Sending Notices

Notices are project specific events with an optional duration.

I.notice("Deployed revision 038ade4 to production")
I.notice("event in the past with a duration",, 20.seconds)

More Ruby + Instrumental

Complete Ruby Agent Docs

Everything to know about the Instrumental Ruby agent, including setup, backfilling and more!

go to docs

Where to Start Monitoring

Not sure what to measure? This guide will help you decide where to start!

read the guide

Using StatsD or statsite? We’ve got you covered with our StatsD backend and statsite sink

Questions? We can help!