File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,3 +45,12 @@ install_plugin Capistrano::Puma::Systemd
4545
4646# Load custom tasks from `lib/capistrano/tasks` if you have any defined
4747Dir . glob ( "lib/capistrano/tasks/*.rake" ) . each { |r | import r }
48+
49+ require "dotenv"
50+ Dotenv . load
51+
52+ if ENV [ "APPSIGNAL_PUSH_API_KEY" ]
53+ require "appsignal/capistrano"
54+ else
55+ warn "\e [33mWarning: APPSIGNAL_PUSH_API_KEY is not set. Deploy marker will not be sent!\e [0m"
56+ end
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ gem "geocoder", "~> 1.8.0"
2020
2121gem "redis" , "~> 4.7.0"
2222
23+ gem "dotenv-rails"
24+
2325# Report GC usage data to StatsD with 'barnes' gem so that Heroku can monitor
2426gem "barnes"
2527
@@ -48,14 +50,14 @@ group :development do
4850end
4951
5052group :production do
53+ gem "appsignal"
5154 gem "aws-sdk-s3" , require : false
5255 gem 'fog-aws'
5356 # security fix for excon gem, which is a fog-aws dependency
5457 gem 'excon' , '>= 0.71.0'
5558 gem 'dalli'
5659 gem 'sendgrid-ruby'
5760 gem 'lograge'
58- gem 'sentry-raven'
5961 gem 'sidekiq'
6062 gem 'rails_autoscale_agent'
6163 gem 'scout_apm'
Original file line number Diff line number Diff line change 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.5 )
86+ logger
87+ rack (>= 2.0.0 )
8588 ast (2.4.3 )
8689 aws-eventstream (1.4.0 )
8790 aws-partitions (1.1172.0 )
405408 doorkeeper (5.8.2 )
406409 railties (>= 5 )
407410 doorkeeper-i18n (4.0.1 )
411+ dotenv (3.1.8 )
412+ dotenv-rails (3.1.8 )
413+ dotenv (= 3.1.8 )
414+ railties (>= 6.1 )
408415 drb (2.2.3 )
409416 dry-auto_inject (1.1.0 )
410417 dry-core (~> 1.1 )
932939 semantic_range (3.1.0 )
933940 sendgrid-ruby (6.7.0 )
934941 ruby_http_client (~> 3.4 )
935- sentry-raven (3.1.2 )
936- faraday (>= 1.0 )
937942 shakapacker (8.3.0 )
938943 activesupport (>= 5.2 )
939944 package_json
@@ -1051,6 +1056,7 @@ PLATFORMS
10511056 x86_64-linux-musl
10521057
10531058DEPENDENCIES
1059+ appsignal
10541060 aws-sdk-s3
10551061 barnes
10561062 byebug
@@ -1068,6 +1074,7 @@ DEPENDENCIES
10681074 decidim-core (= 0.31.0.rc2 )
10691075 decidim-dev (= 0.31.0.rc2 )
10701076 decidim-initiatives (= 0.31.0.rc2 )
1077+ dotenv-rails
10711078 excon (>= 0.71.0 )
10721079 faker
10731080 fog-aws
@@ -1083,7 +1090,6 @@ DEPENDENCIES
10831090 rspec-rails
10841091 scout_apm
10851092 sendgrid-ruby
1086- sentry-raven
10871093 sidekiq
10881094 web-console
10891095 whenever
Original file line number Diff line number Diff line change 22# entry point, but you can change what controller it inherits from
33# so you can customize some methods.
44class 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
155end
Original file line number Diff line number Diff line change 6565
6666 before 'deploy:assets:precompile' , 'deploy:decidim_webpacker_install'
6767end
68+
69+ set :appsignal_config , name : "Metadecidim"
70+ set :appsignal_revision , `git rev-parse --short #{ fetch ( :branch ) } ` . strip
Original file line number Diff line number Diff line change 4141# --------------
4242
4343set :rails_env , 'production'
44+ set :appsignal_env , :production
4445
4546set :ssh_options , {
4647 verify_host_key : :never
Original file line number Diff line number Diff line change 4141# --------------
4242
4343set :rails_env , 'production'
44+ set :appsignal_env , :staging
4445
4546set :ssh_options , {
4647 verify_host_key : :never
You can’t perform that action at this time.
0 commit comments