Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit a1fe77e

Browse files
authored
Merge pull request #1262 from alphagov/remove-sentry-raven
Remove sentry raven
2 parents 4b90b2e + dc9400d commit a1fe77e

File tree

7 files changed

+1
-32
lines changed

7 files changed

+1
-32
lines changed

Gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ gem "plek"
2828
gem "rest-client"
2929
gem "rubyzip"
3030
gem "sass-rails"
31-
gem "sentry-raven"
3231
gem "sentry-sidekiq"
3332
gem "sidekiq-limit_fetch"
3433
gem "sidekiq-scheduler"

Gemfile.lock

+1-3
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,6 @@ GEM
648648
sentry-rails (5.16.1)
649649
railties (>= 5.0)
650650
sentry-ruby (~> 5.16.1)
651-
sentry-raven (3.1.2)
652-
faraday (>= 1.0)
653651
sentry-ruby (5.16.1)
654652
concurrent-ruby (~> 1.0, >= 1.0.2)
655653
sentry-sidekiq (5.16.1)
@@ -721,6 +719,7 @@ GEM
721719

722720
PLATFORMS
723721
aarch64-linux
722+
arm64-darwin-22
724723
arm64-darwin-23
725724
x86_64-darwin-21
726725
x86_64-linux
@@ -766,7 +765,6 @@ DEPENDENCIES
766765
rubocop-govuk
767766
rubyzip
768767
sass-rails
769-
sentry-raven
770768
sentry-sidekiq
771769
sidekiq-limit_fetch
772770
sidekiq-scheduler

app/controllers/application_controller.rb

-20
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class ApplicationController < ActionController::Base
1010

1111
protect_from_forgery with: :exception
1212
before_action :authenticate_user!
13-
before_action :set_raven_context
1413
rescue_from ActiveRecord::RecordNotFound, with: :record_not_found
1514

1615
rescue_from CanCan::AccessDenied do
@@ -26,23 +25,4 @@ class ApplicationController < ActionController::Base
2625
def record_not_found
2726
render plain: "404 Not Found", status: :not_found
2827
end
29-
30-
def set_raven_context
31-
Raven.extra_context(
32-
params: params.to_unsafe_h,
33-
url: request.url,
34-
environment: Rails.env,
35-
app_environment: ENV["VCAP_APPLICATION"],
36-
)
37-
38-
return unless current_user
39-
40-
Raven.user_context(
41-
id: current_user.id,
42-
name: current_user.name,
43-
email: current_user.email,
44-
organisation_id: current_user.primary_organisation.id,
45-
organisation: current_user.primary_organisation.name,
46-
)
47-
end
4828
end

app/services/alias_updater_service.rb

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def assign_alias_to_new_index
2020
rescue StandardError => e
2121
msg = "Could not update alias.\n #{e.message}"
2222
@logger.error msg
23-
Raven.capture_exception msg
2423
end
2524

2625
def remove_index_actions

app/services/index_deletion_service.rb

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ def run
1515
rescue StandardError => e
1616
msg = "Failed to delete old indexes.\n#{e.message}"
1717
logger.error msg
18-
Raven.capture_exception(e)
1918
end
2019

2120
private

config/initializers/raven.rb

-5
This file was deleted.

lib/tasks/search.rake

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ namespace :search do
4545

4646
if indexes.include?(legacy_index)
4747
msg = "An alias can not be assigned to index of the same name. Please delete index '#{legacy_index}' before continuing."
48-
Raven.capture_exception msg
4948
raise msg
5049
end
5150

0 commit comments

Comments
 (0)