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:
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' I = Instrumental::Agent.new('PROJECT_TOKEN')
Increments are simple counters. learn more
Gauges represent a value at a point in time. learn more
The time method measures code execution time.
I.time('app.query_time.post.find') do post = Post.find(1) end
Notices are project specific events.
I.notice("Deployed revision 038ade4 to production") I.notice("event in the past with a duration", 1.day.ago, 20.seconds)