AppSignal agent for Ruby
Latest commit 4eed259 Oct 26, 2016 @tombruijn tombruijn Bump to v2.0.0 [ci skip]

AppSignal Ruby agent

AppSignal solves all your Ruby monitoring needs in a single tool. You and your team can focus on writing code and we'll provide the alerts if your app has any issues.

Build Status Gem Version Code Climate


The AppSignal gem collects exceptions and performance data from your Ruby applications and sends it to AppSignal for analysis. Get alerted when an error occurs or an endpoint is responding very slowly.

AppSignal aims to provide a one stop solution to all your monitoring needs. Track metrics from your servers with our Host metrics and graph everything else with our Custom metrics feature.


First make sure you've installed AppSignal in your application by following the steps in Installation.

AppSignal will automatically monitor requests, report any exceptions that are thrown and any performance issues that might have occurred.

You can also add extra information to requests by adding custom instrumentation and by adding metadata.

Track any error

Catch any error and report it to AppSignal, even if it doesn't crash a request.

  config ="config.yml")
rescue => e
  # Load alternative config
  config = { :name => ENV["NAME"] }

Read more about Exception handling in our documentation.

Set metadata

Need more information with errors and performance issues? Add metadata to your requests to identify common factors for problems.

Appsignal.set_metadata("user id",
Appsignal.set_metadata("comments count", user.comments.count)

Custom instrumentation

If you need more fine-grained instrumentation you can add custom instrumentation anywhere in your code.

# Simple instrumentation
Appsignal.instrument("array_to_hash.expensive_logic", "Complex calculations") do
  Hash[["a", 1], ["b", 2], ["c", 3]]

# Add the query that you're monitoring
sql = "SELECT * FROM posts ORDER BY created_at DESC LIMIT 1"
Appsignal.instrument("fetch.custom_database", "Fetch latest post", sql) do
  # ...

# Nested instrumentation calls are also supported!
Appsignal.instrument("fetch.custom_database", "Fetch current user") do
  # ...

  Appsignal.instrument("write.custom_database", "Write user update") do
    # ...

Read more about custom instrumentation in our documentation.


First, sign up for an AppSignal account and add the appsignal gem to your Gemfile. Then, run bundle install.

# Gemfile
gem "appsignal"

Afterward, you can use the appsignal install command to install AppSignal into your application by using the "Push API key". This will guide you through our installation wizard.

appsignal install [push api key]

Depending on what framework or gems you use some manual integration is required. Follow the steps in the wizard or consult our [Supported systems and frameworks] page for help.

If you're stuck feel free to contact us!

Supported frameworks and gems

AppSignal automatically supports a collection of Ruby frameworks and gems, including but not limited to:

  • Ruby on Rails
  • Rack
  • Sinatra
  • Padrino
  • Grape
  • Webmachine
  • Capistrano
  • Sidekiq
  • Delayed Job
  • Resque
  • Rake

AppSignal instrumentation doesn't depend on automatic integrations. It's easy to set up custom instrumentation to add keep track of anything.

For more detailed information and examples please visit our Supported frameworks page.

Front-end monitoring (Beta)

We have a Front-end monitoring program running in Beta currently. Be sure to check it out!

Supported systems

Currently the AppSignal agent works on most Unix-like operating systems, such as most Linux distributions and macOS, excluding Alpine Linux, FreeBSD and Windows.

For more detailed information please visit our Supported systems page.


Make sure you have Bundler installed and then use the Rake install task to install all possible dependencies.

gem install bundler
rake install

AppSignal runs in many different configurations. To replicate these configurations you need to run the spec suite with a specific Gemfile.

BUNDLE_GEMFILE=gemfiles/capistrano2.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/capistrano3.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/grape.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/no_dependencies.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/padrino.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/rails-3.2.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/rails-4.0.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/rails-4.1.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/rails-4.2.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/rails-5.0.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/resque.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/sequel-435.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/sequel.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/sinatra.gemfile bundle exec rspec
BUNDLE_GEMFILE=gemfiles/webmachine.gemfile bundle exec rspec

If you have either RVM or rbenv installed you can also use rake generate_bundle_and_spec_all to generate a script that runs specs for all Ruby versions and gem combinations we support.

We run the suite against all of the Gemfiles mentioned above and on a number of different Ruby versions.


This gem uses Semantic Versioning.

The master branch corresponds to the current stable release of the gem.

The develop branch is used for development of features that will end up in the next minor release.

Open a Pull Request on the master branch if you're fixing a bug. For new new features, open a Pull Request on the develop branch.

Every stable and unstable release is tagged in git with a version tag.


Thinking of contributing to our gem? Awesome! 🚀

Please follow our Contributing guide in our documentation.

Also, we would be very happy to send you Stroopwafles. Have look at everyone we send a package to so far on our Stroopwafles page.


Contact us and speak directly with the engineers working on AppSignal. They will help you get set up, tweak your code and make sure you get the most out of using AppSignal.