Skip to content

Commit e159a22

Browse files
committed
Add appsignal and remove sentry
1 parent dc70308 commit e159a22

7 files changed

Lines changed: 11 additions & 14 deletions

File tree

Capfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ require "capistrano/rails/migrations"
3838
require "capistrano/rails/console"
3939
require "capistrano/sidekiq"
4040
require "whenever/capistrano"
41+
require "appsignal/capistrano"
4142
install_plugin Capistrano::Sidekiq # Default sidekiq tasks
4243
install_plugin Capistrano::Sidekiq::Systemd # Systemd integration
4344
install_plugin Capistrano::Puma

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ group :development do
4848
end
4949

5050
group :production do
51+
gem "appsignal"
5152
gem "aws-sdk-s3", require: false
5253
gem 'fog-aws'
5354
# security fix for excon gem, which is a fog-aws dependency
5455
gem 'excon', '>= 0.71.0'
5556
gem 'dalli'
5657
gem 'sendgrid-ruby'
5758
gem 'lograge'
58-
gem 'sentry-raven'
5959
gem 'sidekiq'
6060
gem 'rails_autoscale_agent'
6161
gem 'scout_apm'

Gemfile.lock

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ GEM
8282
public_suffix (>= 2.0.2, < 7.0)
8383
airbrussh (1.5.3)
8484
sshkit (>= 1.6.1, != 1.7.0)
85+
appsignal (4.7.0)
86+
logger
87+
rack (>= 2.0.0)
8588
ast (2.4.3)
8689
aws-eventstream (1.4.0)
8790
aws-partitions (1.1172.0)
@@ -932,8 +935,6 @@ GEM
932935
semantic_range (3.1.0)
933936
sendgrid-ruby (6.7.0)
934937
ruby_http_client (~> 3.4)
935-
sentry-raven (3.1.2)
936-
faraday (>= 1.0)
937938
shakapacker (8.3.0)
938939
activesupport (>= 5.2)
939940
package_json
@@ -1051,6 +1052,7 @@ PLATFORMS
10511052
x86_64-linux-musl
10521053

10531054
DEPENDENCIES
1055+
appsignal
10541056
aws-sdk-s3
10551057
barnes
10561058
byebug
@@ -1083,7 +1085,6 @@ DEPENDENCIES
10831085
rspec-rails
10841086
scout_apm
10851087
sendgrid-ruby
1086-
sentry-raven
10871088
sidekiq
10881089
web-console
10891090
whenever

app/controllers/decidim_controller.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,4 @@
22
# entry point, but you can change what controller it inherits from
33
# so you can customize some methods.
44
class DecidimController < ApplicationController
5-
before_action :set_raven_context
6-
7-
private
8-
9-
def set_raven_context
10-
return unless Rails.env.production?
11-
12-
Raven.user_context({id: try(:current_user).try(:id)}.merge(session))
13-
Raven.extra_context(params: params.to_unsafe_h, url: request.url)
14-
end
155
end

config/deploy.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@
6565

6666
before 'deploy:assets:precompile', 'deploy:decidim_webpacker_install'
6767
end
68+
69+
set :appsignal_config, name: "Metadecidim"
70+
set :appsignal_revision, `git rev-parse --short #{fetch(:branch)}`.strip

config/deploy/production.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
# --------------
4242

4343
set :rails_env, 'production'
44+
set :appsignal_env, :production
4445

4546
set :ssh_options, {
4647
verify_host_key: :never

config/deploy/staging.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
# --------------
4242

4343
set :rails_env, 'production'
44+
set :appsignal_env, :staging
4445

4546
set :ssh_options, {
4647
verify_host_key: :never

0 commit comments

Comments
 (0)