diff --git a/Gemfile b/Gemfile index 02c406e63..9b468c02f 100644 --- a/Gemfile +++ b/Gemfile @@ -20,7 +20,6 @@ gem 'dalli', '~> 2.7', '>= 2.7.6' gem 'lograge', '~> 0.10.0' gem 'logstash-event', '~> 1.2', '>= 1.2.02' gem 'logstash-logger', '~> 0.26.1' -# gem 'bugsnag', '~> 6.1', '>= 6.1.1' gem 'sentry-raven', '~> 2.9' gem 'gender_detector', '~> 0.1.2' gem 'active_model_serializers', '~> 0.10.0' diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 01c5cf441..e0deab059 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -19,8 +19,6 @@ class ApplicationController < ActionController::API # pass ability into serializer serialization_scope :current_ability - # before_bugsnag_notify :add_user_info_to_bugsnag - before_action :default_format_json, :transform_params, :set_raven_context after_action :set_jsonp_format, :set_consumer_header @@ -124,16 +122,6 @@ def append_info_to_payload(payload) payload[:uid] = current_user.uid.downcase if current_user.try(:uid) end - # def add_user_info_to_bugsnag(report) - # return nil unless current_user.try(:uid) - - # report.user = { - # email: current_user.email, - # name: current_user.name, - # id: current_user.uid - # } - # end - def set_raven_context if current_user.try(:uid) Raven.user_context( diff --git a/app/controllers/clients_controller.rb b/app/controllers/clients_controller.rb index 72dc8d148..919c6fc85 100644 --- a/app/controllers/clients_controller.rb +++ b/app/controllers/clients_controller.rb @@ -61,8 +61,6 @@ def index options[:is_collection] = true render json: ClientSerializer.new(@clients, options).serialized_json, status: :ok - rescue Elasticsearch::Transport::Transport::Errors::GatewayTimeout => exception - head :gateway_timeout rescue Elasticsearch::Transport::Transport::Errors::BadRequest => exception Raven.capture_exception(exception) diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index 8e576d968..dfa1704ce 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -8,7 +8,6 @@ class DoisController < ApplicationController prepend_before_action :authenticate_user! before_action :set_doi, only: [:show, :destroy, :get_url] before_action :set_include, only: [:index, :show, :create, :update] - # before_bugsnag_notify :add_metadata_to_bugsnag def index authorize! :read, Doi @@ -156,8 +155,6 @@ def index end format.any(:bibtex, :citeproc, :codemeta, :crosscite, :datacite, :datacite_json, :jats, :ris, :csv, :schema_org) { render request.format.to_sym => response.records.to_a } end - rescue Elasticsearch::Transport::Transport::Errors::GatewayTimeout => exception - head :gateway_timeout rescue Elasticsearch::Transport::Transport::Errors::BadRequest => exception Raven.capture_exception(exception) diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index ccf07d814..94c1e50e5 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -60,8 +60,6 @@ def index options[:links] = nil render json: MemberSerializer.new(@members, options).serialized_json, status: :ok - rescue Elasticsearch::Transport::Transport::Errors::GatewayTimeout => exception - head :gateway_timeout rescue Elasticsearch::Transport::Transport::Errors::BadRequest => exception Raven.capture_exception(exception) diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index 135dea0c1..3943baf2b 100644 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -2,7 +2,6 @@ class WorksController < ApplicationController prepend_before_action :authenticate_user! before_action :set_doi, only: [:show] before_action :set_include, only: [:index, :show] - # before_bugsnag_notify :add_metadata_to_bugsnag def index authorize! :read, Doi diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index 9fe6a3665..2f1db77fe 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -3,6 +3,6 @@ config.release = "lupo:" + Lupo::Application::VERSION config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_s) - # ignore 502 and 503 from Elasticsearch - config.excluded_exceptions += ['Elasticsearch::Transport::Transport::Errors::BadGateway', 'Elasticsearch::Transport::Transport::Errors::ServiceUnavailable'] + # ignore 502, 503 and 504 from Elasticsearch + config.excluded_exceptions += ['Elasticsearch::Transport::Transport::Errors::BadGateway', 'Elasticsearch::Transport::Transport::Errors::ServiceUnavailable', 'Elasticsearch::Transport::Transport::Errors::GatewayTimeout'] end \ No newline at end of file diff --git a/vendor/middleman/source/layouts/layout.erb b/vendor/middleman/source/layouts/layout.erb index 877498a34..77dff4052 100644 --- a/vendor/middleman/source/layouts/layout.erb +++ b/vendor/middleman/source/layouts/layout.erb @@ -42,13 +42,6 @@ - - <% if ENV['BUGSNAG_JS_KEY'] %> - - <% end -%> <% header_links = development? ? data.links.development_links : (stage? ? data.links.stage_links : data.links.production_links) %>