4

Does rollbar impact a rails application performance? From development and quality perspectives, it's a very useful. But I worry about production performance.

Charmi
  • 594
  • 1
  • 5
  • 20

1 Answers1

5

Rollbar will have a varying impact on application performance depending on how you configure it and how often your application is reporting errors.

By default, Rollbar sends error data synchronously, and the typical response time from the API will be 10s to low 100s of milliseconds.

To minimize performance impact, you can configure Rollbar to send data asynchronously using one of the following options:

girl_friday

Add the following in config/initializers/rollbar.rb:

config.use_async = true

Asynchronous reporting falls back to Threading if girl_friday is not installed.

sucker_punch

Add the following in config/initializers/rollbar.rb:

config.use_sucker_punch

Sidekiq

Add the following in config/initializers/rollbar.rb:

config.use_sidekiq

The default Sidekiq queue will be rollbar but you can also supply custom Sidekiq options:

config.use_sidekiq 'queue' => 'default'

You also need to add the name of the queue to your sidekiq.yml

:queues:
- default
- rollbar

Start the redis server:

$ redis-server

Start Sidekiq from the root directory of your Rails app and declare the name of your queue. Unless you've configured otherwise, the queue name is rollbar:

$ bundle exec sidekiq -q rollbar

For every error job a new report will be sent to Rollbar API, also for error retried jobs. You can configure the retries threshold to start reporting to rollbar:

config.sidekiq_threshold = 3 # Start reporting from 3 retries jobs

Resque

Add the following in config/initializers/rollbar.rb:

config.use_resque

You can also supply a custom Resque queue:

config.use_resque :queue => 'my_queue'

Now you can just start a new Resque worker processing jobs in that queue:

$ QUEUE=my_queue bundle exec resque:work

DelayedJob

Add the following in config/initializers/rollbar.rb:

config.use_delayed_job

Threading

Add the following in config/initializers/rollbar.rb:

config.use_thread

Full details of available options are in the rollbar-gem docs.

hidefromkgb
  • 5,834
  • 1
  • 13
  • 44
Jesse Gibbs
  • 160
  • 1
  • 7