Merge branch 'improvement/rollbar' into 'master'
Add Rollbar See merge request !66
This commit is contained in:
commit
0e7d9ba269
1
Capfile
1
Capfile
|
@ -13,6 +13,7 @@ require "rvm1/capistrano3"
|
||||||
require "capistrano/bundler"
|
require "capistrano/bundler"
|
||||||
require "capistrano/rails/assets"
|
require "capistrano/rails/assets"
|
||||||
require "capistrano/rails/migrations"
|
require "capistrano/rails/migrations"
|
||||||
|
require "rollbar/capistrano3"
|
||||||
|
|
||||||
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
|
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
|
||||||
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
|
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
|
||||||
|
|
|
@ -346,7 +346,7 @@ GEM
|
||||||
minitest (5.8.4)
|
minitest (5.8.4)
|
||||||
momentjs-rails (2.11.0)
|
momentjs-rails (2.11.0)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
multi_json (1.11.2)
|
multi_json (1.12.1)
|
||||||
multi_xml (0.5.5)
|
multi_xml (0.5.5)
|
||||||
multipart-post (2.0.0)
|
multipart-post (2.0.0)
|
||||||
naught (1.1.0)
|
naught (1.1.0)
|
||||||
|
@ -463,7 +463,7 @@ GEM
|
||||||
remotipart (1.2.1)
|
remotipart (1.2.1)
|
||||||
responders (2.1.1)
|
responders (2.1.1)
|
||||||
railties (>= 4.2.0, < 5.1)
|
railties (>= 4.2.0, < 5.1)
|
||||||
rollbar (2.7.1)
|
rollbar (2.14.1)
|
||||||
multi_json
|
multi_json
|
||||||
rspec-core (3.0.4)
|
rspec-core (3.0.4)
|
||||||
rspec-support (~> 3.0.0)
|
rspec-support (~> 3.0.0)
|
||||||
|
@ -689,4 +689,4 @@ DEPENDENCIES
|
||||||
will_paginate-bootstrap
|
will_paginate-bootstrap
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.13.7
|
1.14.6
|
||||||
|
|
|
@ -35,5 +35,10 @@ append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/uplo
|
||||||
# Ruby version / RVM
|
# Ruby version / RVM
|
||||||
set :rvm1_ruby_version, '2.3.3@retrospring'
|
set :rvm1_ruby_version, '2.3.3@retrospring'
|
||||||
|
|
||||||
|
# Rollbar
|
||||||
|
set :rollbar_token, '35f65946f562414da66d0d48073f5290' # TODO: before publishing this repo (again) remove this token
|
||||||
|
set :rollbar_env, Proc.new { fetch :stage }
|
||||||
|
set :rollbar_role, Proc.new { :app }
|
||||||
|
|
||||||
# Restart the app server after successful deploy
|
# Restart the app server after successful deploy
|
||||||
after 'deploy:cleanup', 'deploy:restart'
|
after 'deploy:cleanup', 'deploy:restart'
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
require 'rollbar/rails'
|
|
||||||
Rollbar.configure do |config|
|
Rollbar.configure do |config|
|
||||||
# Without configuration, Rollbar is enabled in all environments.
|
# Without configuration, Rollbar is enabled in all environments.
|
||||||
# To disable in specific environments, set config.enabled=false.
|
# To disable in specific environments, set config.enabled=false.
|
||||||
|
|
||||||
config.access_token = ENV['ROLLBAR_ACCESS_TOKEN']
|
|
||||||
|
|
||||||
# Here we'll disable in 'test' and 'development':
|
config.access_token = APP_CONFIG.dig('rollbar', 'access_token')
|
||||||
if Rails.env.test? or Rails.env.development?
|
|
||||||
|
# Here we'll disable in 'test':
|
||||||
|
if Rails.env.test?
|
||||||
config.enabled = false
|
config.enabled = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -41,14 +40,21 @@ Rollbar.configure do |config|
|
||||||
# config.use_async = true
|
# config.use_async = true
|
||||||
# Supply your own async handler:
|
# Supply your own async handler:
|
||||||
# config.async_handler = Proc.new { |payload|
|
# 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)
|
# Enable asynchronous reporting (using sucker_punch)
|
||||||
# config.use_sucker_punch
|
# config.use_sucker_punch
|
||||||
|
|
||||||
# Enable delayed reporting (using Sidekiq)
|
# Enable delayed reporting (using Sidekiq)
|
||||||
# config.use_sidekiq
|
config.use_sidekiq
|
||||||
# You can supply custom Sidekiq options:
|
# You can supply custom Sidekiq options:
|
||||||
config.use_sidekiq 'queue' => 'rollbar'
|
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
|
end
|
||||||
|
|
|
@ -54,3 +54,6 @@ fog:
|
||||||
directory: 'retrospring'
|
directory: 'retrospring'
|
||||||
# URL host, comment out to use default, GENERALLY you don't want to define this
|
# URL host, comment out to use default, GENERALLY you don't want to define this
|
||||||
# host: ''
|
# host: ''
|
||||||
|
|
||||||
|
rollbar:
|
||||||
|
access_token: 'sdklgfnaldkfg'
|
||||||
|
|
Loading…
Reference in New Issue