diff --git a/Capfile b/Capfile index de6cec89..cfef1975 100644 --- a/Capfile +++ b/Capfile @@ -13,7 +13,6 @@ install_plugin Capistrano::SCM::Git require "capistrano/bundler" require "capistrano/rails/assets" require "capistrano/rails/migrations" -require "rollbar/capistrano3" # Load custom tasks from `lib/capistrano/tasks` if you have any defined Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r } diff --git a/Gemfile b/Gemfile index 084279e6..8e8d9e33 100644 --- a/Gemfile +++ b/Gemfile @@ -71,8 +71,6 @@ gem 'redis' gem 'fake_email_validator' -gem 'rollbar' - group :development do # require spring 1.3.5 since shit's on fire on my local instance with 1.3.4 (Gem::LoadError) gem 'spring', '~> 1.3.5' diff --git a/Gemfile.lock b/Gemfile.lock index b6b03f82..0214ce89 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -394,7 +394,6 @@ GEM responders (3.0.0) actionpack (>= 5.0) railties (>= 5.0) - rollbar (2.24.0) rspec-core (3.9.1) rspec-support (~> 3.9.1) rspec-expectations (3.9.1) @@ -581,7 +580,6 @@ DEPENDENCIES rbnacl-libsodium redcarpet redis - rollbar rspec-rails (~> 3.9) ruby-progressbar sanitize diff --git a/app/workers/deletion_worker.rb b/app/workers/deletion_worker.rb index af8042f3..9a1dfd7d 100644 --- a/app/workers/deletion_worker.rb +++ b/app/workers/deletion_worker.rb @@ -9,7 +9,7 @@ class DeletionWorker User.find(resource_id).destroy! rescue => e logger.info "failed to delete user: #{e.message}" - Rollbar.error(e) + NewRelic::Agent.notice_error(e) end end end diff --git a/app/workers/question_worker.rb b/app/workers/question_worker.rb index adfd5610..53d72c75 100644 --- a/app/workers/question_worker.rb +++ b/app/workers/question_worker.rb @@ -22,7 +22,7 @@ class QuestionWorker end rescue => e logger.info "failed to ask question: #{e.message}" - Rollbar.error(e) + NewRelic::Agent.notice_error(e) end end end diff --git a/app/workers/share_worker.rb b/app/workers/share_worker.rb index ab6d869f..fc4eb5b9 100644 --- a/app/workers/share_worker.rb +++ b/app/workers/share_worker.rb @@ -12,7 +12,7 @@ class ShareWorker service.post(Answer.find(answer_id)) if services.include? service.provider rescue => e logger.info "failed to post answer #{answer_id} to #{service.provider} for user #{user_id}: #{e.message}" - Rollbar.error(e) + NewRelic::Agent.notice_error(e) end end end diff --git a/config/deploy.rb b/config/deploy.rb index 2cf3bb7b..e84e4b49 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -36,11 +36,6 @@ append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/uplo # Ruby version / RVM 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 } - # Create JS i18n files before precompiling assets before 'deploy:assets:precompile', 'deploy:i18n_js' diff --git a/config/initializers/rollbar.rb b/config/initializers/rollbar.rb deleted file mode 100644 index 8b161ca6..00000000 --- a/config/initializers/rollbar.rb +++ /dev/null @@ -1,65 +0,0 @@ -Rollbar.configure do |config| - # Without configuration, Rollbar is enabled in all environments. - # To disable in specific environments, set config.enabled=false. - - config.access_token = APP_CONFIG.dig('rollbar', 'access_token') - - # Here we'll disable in 'test': - if Rails.env.test? - config.enabled = false - end - # Here we'll disable it anywhere else: - config.enabled = false - - # scrub out the "confirmation_token" field - config.scrub_fields |= [:confirmation_token] - - # By default, Rollbar will try to call the `current_user` controller method - # to fetch the logged-in user object, and then call that object's `id`, - # `username`, and `email` methods to fetch those properties. To customize: - # config.person_method = "my_current_user" - # config.person_id_method = "my_id" - # config.person_username_method = "my_username" - # config.person_email_method = "my_email" - - # If you want to attach custom data to all exception and message reports, - # provide a lambda like the following. It should return a hash. - # config.custom_data_method = lambda { {:some_key => "some_value" } } - - # Add exception class names to the exception_level_filters hash to - # change the level that exception is reported at. Note that if an exception - # has already been reported and logged the level will need to be changed - # via the rollbar interface. - # Valid levels: 'critical', 'error', 'warning', 'info', 'debug', 'ignore' - # 'ignore' will cause the exception to not be reported at all. - # config.exception_level_filters.merge!('MyCriticalException' => 'critical') - # - # You can also specify a callable, which will be called with the exception instance. - # config.exception_level_filters.merge!('MyCriticalException' => lambda { |e| 'critical' }) - config.exception_level_filters.merge!( - 'ActiveRecord::RecordNotFound' => 'ignore' - ) - - # Enable asynchronous reporting (uses girl_friday or Threading if girl_friday - # is not installed) - # config.use_async = true - # Supply your own async handler: - # config.async_handler = Proc.new { |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 - # 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 diff --git a/config/justask.yml.example b/config/justask.yml.example index 6af4a606..a0b28e63 100644 --- a/config/justask.yml.example +++ b/config/justask.yml.example @@ -62,6 +62,3 @@ fog: directory: 'retrospring' # URL host, comment out to use default, GENERALLY you don't want to define this # host: '' - -rollbar: - access_token: 'sdklgfnaldkfg' diff --git a/lib/exporter.rb b/lib/exporter.rb index 902ddba2..08f3e3c9 100644 --- a/lib/exporter.rb +++ b/lib/exporter.rb @@ -22,7 +22,7 @@ class Exporter finalize publish rescue => e - Rollbar.error(e) + NewRelic::Agent.notice_error(e) @user.export_processing = false @user.save validate: false end