Knowledge Base: Monitoring Merb Applications

Supported versions of Merb

Dash supports Merb >= 1.0. For more information, see the Support Scale page.

Installation

After adding a new Dash application, you'll need to instrument your Merb application using the following steps.

Step 1: Install the gems

This should install the fiveruns-dash-ruby gem and other dependencies.

$ sudo gem install fiveruns-dash-merb --source http://gems.github.com

Want metrics from DataMapper or ActiveRecord? Just install the appropriate recipe gem:

DataMapper
$ sudo gem install fiveruns-dash-datamapper --source http://gems.github.com

ActiveRecord
$ sudo gem install fiveruns-dash-activerecord --source http://gems.github.com

Step 2: Add the dependency

In your config/dependencies.rb:

dependency 'fiveruns-dash-merb', :immediate => true

Be sure you include the :immediate option.

Step 3: Configure your App tokens and environments

An application token will be used to identify your application (running in a specific environment) to Dash; you'll need to create a new Dash application for every environment you intend to monitor—since performance characteristics of environments can wildly differ, it doesn't make sense to mix the data, and sometimes it's very useful to compare them.

You can find the application token for your app in its "Configuration" pages.

Add the following to the environment file for each environment you'd like to monitor (eg, config/environments/production.rb):

Merb::Config.use { |c|
  # ...
  c[:dash][:token] = 'YOUR-APP-TOKEN'
  #...
end

Please note that instrumenting development environments is not recommended.

For more information and to add your own recipes and custom metrics, see the Customization Guide.

Step 4: Restart your application and begin collecting data

After restarting your application, "exercise" your app a bit; you should see data flow into Dash within a minute or two.