Update rollbar gem + config

This commit is contained in:
Georg Gadinger 2017-03-29 22:55:50 +02:00
parent 3e2e23e17c
commit 9724c1cc0e
3 changed files with 19 additions and 10 deletions

View File

@ -346,7 +346,7 @@ GEM
minitest (5.8.4)
momentjs-rails (2.11.0)
railties (>= 3.1)
multi_json (1.11.2)
multi_json (1.12.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
naught (1.1.0)
@ -463,7 +463,7 @@ GEM
remotipart (1.2.1)
responders (2.1.1)
railties (>= 4.2.0, < 5.1)
rollbar (2.7.1)
rollbar (2.14.1)
multi_json
rspec-core (3.0.4)
rspec-support (~> 3.0.0)
@ -689,4 +689,4 @@ DEPENDENCIES
will_paginate-bootstrap
BUNDLED WITH
1.13.7
1.14.6

View File

@ -1,12 +1,11 @@
require 'rollbar/rails'
Rollbar.configure do |config|
# Without configuration, Rollbar is enabled in all environments.
# To disable in specific environments, set config.enabled=false.
config.access_token = ENV['ROLLBAR_ACCESS_TOKEN']
# Here we'll disable in 'test' and 'development':
if Rails.env.test? or Rails.env.development?
config.access_token = APP_CONFIG.dig('rollbar', 'access_token')
# Here we'll disable in 'test':
if Rails.env.test?
config.enabled = false
end
@ -41,14 +40,21 @@ Rollbar.configure do |config|
# config.use_async = true
# Supply your own async handler:
# config.async_handler = Proc.new { |payload|
# Thread.new { Rollbar.process_payload_safely(payload) }
# Thread.new { Rollbar.process_from_async_handler(payload) }
# }
# Enable asynchronous reporting (using sucker_punch)
# config.use_sucker_punch
# Enable delayed reporting (using Sidekiq)
# config.use_sidekiq
config.use_sidekiq
# You can supply custom Sidekiq options:
config.use_sidekiq 'queue' => 'rollbar'
# If you run your staging application instance in production environment then
# you'll want to override the environment reported by `Rails.env` with an
# environment variable like this: `ROLLBAR_ENV=staging`. This is a recommended
# setup for Heroku. See:
# https://devcenter.heroku.com/articles/deploying-to-a-custom-rails-environment
config.environment = ENV['ROLLBAR_ENV'] || Rails.env
end

View File

@ -54,3 +54,6 @@ fog:
directory: 'retrospring'
# URL host, comment out to use default, GENERALLY you don't want to define this
# host: ''
rollbar:
access_token: 'sdklgfnaldkfg'