File tree Expand file tree Collapse file tree 7 files changed +45
-39
lines changed Expand file tree Collapse file tree 7 files changed +45
-39
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,18 @@ jobs:
2424 if : ${{ github.event.workflow_run.conclusion == 'success' }}
2525 runs-on : ubuntu-latest
2626 steps :
27- - name : Check out repository
28- uses : actions/checkout@v4
27+ - uses : actions/checkout@v4
28+ with :
29+ fetch-depth : 0
2930 - name : Set up flyctl
3031 uses : superfly/flyctl-actions/setup-flyctl@master
3132 - name : Deploy to Fly.io
3233 run : flyctl deploy --remote-only
33- - name : Notify Bugsnag
34- 34+ - name : Create Sentry release
35+ uses : getsentry/action-release@v3
36+ env :
37+ SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
38+ SENTRY_ORG : timcodes
39+ SENTRY_PROJECT : flyweight-backend
3540 with :
36- apiKey : ${{ secrets.BUGSNAG_API_KEY }}
37- appVersion : ${{ github.sha }}
38- releaseStage : production
41+ environment : production
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ gem "pg"
2727gem "jbuilder"
2828
2929# ERRORS
30- gem "bugsnag"
30+ gem "sentry-rails"
31+ gem "sentry-ruby"
3132
3233group :development do
3334 # LINT
Original file line number Diff line number Diff line change 9494 base64 (0.3.0 )
9595 bcrypt (3.1.20 )
9696 benchmark (0.4.1 )
97- bigdecimal (3.2.3 )
97+ bigdecimal (3.3.0 )
9898 binding_of_caller (1.0.1 )
9999 debug_inspector (>= 1.2.0 )
100100 bootsnap (1.18.6 )
101101 msgpack (~> 1.2 )
102102 brakeman (7.1.0 )
103103 racc
104- bugsnag (6.28.0 )
105- concurrent-ruby (~> 1.0 )
106104 builder (3.3.0 )
107105 concurrent-ruby (1.3.5 )
108106 connection_pool (2.5.4 )
139137 concurrent-ruby (~> 1.0 )
140138 logger
141139 zeitwerk (~> 2.6 )
142- erb (5.0.2 )
140+ erb (5.0.3 )
143141 erubi (1.13.1 )
144142 et-orbi (1.4.0 )
145143 tzinfo
182180 google-protobuf (4.32.1-x86_64-linux-musl )
183181 bigdecimal
184182 rake (>= 13 )
185- googleapis-common-protos-types (1.21 .0 )
183+ googleapis-common-protos-types (1.22 .0 )
186184 google-protobuf (~> 4.26 )
187185 grpc (1.75.0 )
188186 google-protobuf (>= 3.25 , < 5.0 )
234232 net-smtp
235233 marcel (1.1.0 )
236234 mini_mime (1.1.5 )
237- minitest (5.25.5 )
235+ minitest (5.26.0 )
238236 msgpack (1.8.0 )
239- net-imap (0.5.10 )
237+ net-imap (0.5.12 )
240238 date
241239 net-protocol
242240 net-pop (0.1.2 )
270268 pg (1.6.2-x86_64-darwin )
271269 pg (1.6.2-x86_64-linux )
272270 pg (1.6.2-x86_64-linux-musl )
273- pp (0.6.2 )
271+ pp (0.6.3 )
274272 prettyprint
275273 prettyprint (0.2.0 )
276274 psych (5.2.6 )
281279 nio4r (~> 2.0 )
282280 raabro (1.4.0 )
283281 racc (1.8.1 )
284- rack (3.2.1 )
282+ rack (3.2.2 )
285283 rack-cors (3.0.0 )
286284 logger
287285 rack (>= 3.0.14 )
327325 tsort (>= 0.2 )
328326 zeitwerk (~> 2.6 )
329327 rake (13.3.0 )
330- rdoc (6.14.2 )
328+ rdoc (6.15.0 )
331329 erb
332330 psych (>= 4.0.0 )
331+ tsort
333332 redcarpet (3.6.1 )
334333 redis (5.4.1 )
335334 redis-client (>= 0.22.0 )
@@ -360,13 +359,19 @@ GEM
360359 rspec-support (3.13.6 )
361360 ruby-next-core (1.1.2 )
362361 securerandom (0.4.1 )
362+ sentry-rails (5.28.0 )
363+ railties (>= 5.0 )
364+ sentry-ruby (~> 5.28.0 )
365+ sentry-ruby (5.28.0 )
366+ bigdecimal
367+ concurrent-ruby (~> 1.0 , >= 1.0.2 )
363368 stringio (3.1.7 )
364369 thor (1.4.0 )
365370 timeout (0.4.3 )
366371 tsort (0.2.0 )
367372 tzinfo (2.0.6 )
368373 concurrent-ruby (~> 1.0 )
369- uri (1.0.3 )
374+ uri (1.0.4 )
370375 useragent (0.16.11 )
371376 warden (1.2.9 )
372377 rack (>= 2.0.9 )
@@ -403,7 +408,6 @@ DEPENDENCIES
403408 binding_of_caller
404409 bootsnap
405410 brakeman
406- bugsnag
407411 database_cleaner-active_record
408412 devise
409413 devise-jwt
@@ -423,6 +427,8 @@ DEPENDENCIES
423427 redis
424428 responders
425429 rspec-rails
430+ sentry-rails
431+ sentry-ruby
426432 webmock
427433 yard
428434
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ class ApplicationController < ActionController::API
2525 rescue_from ActiveRecord ::RecordNotFound , with : :not_found
2626
2727 before_action :configure_permitted_parameters , if : :devise_controller?
28- before_bugsnag_notify :add_user_info_to_bugsnag
2928
3029 protected
3130
@@ -60,10 +59,4 @@ def error_json(error)
6059 { error : I18n . t ( "application_controller.errors.internal_server_error" ) }
6160 end
6261 end
63-
64- def add_user_info_to_bugsnag ( report )
65- report . pilot = {
66- id : current_pilot . id
67- } if pilot_signed_in?
68- end
6962end
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66# See the Securing Rails Applications Guide for more information:
77# https://guides.rubyonrails.org/security.html#content-security-policy-header
88
9- # Bugsnag requires:
10- # - connect-src 'https://sessions.bugsnag.com'
11- #
129# Vue.js in development requires:
1310# - connect-src 'ws://localhost:3035' 'http://localhost:3035'
1411
1512extra_image_sources = %w[ ]
1613extra_script_sources = [ ]
17- extra_connect_sources = %w[
18- https://sessions.bugsnag.com
19- ]
14+ extra_connect_sources = %w[ ]
2015
2116if Rails . env . development? || Rails . env . cypress?
2217 extra_script_sources << :unsafe_eval << :unsafe_inline
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ Sentry . init do |config |
4+ config . breadcrumbs_logger = %i[ active_support_logger http_logger ]
5+ config . dsn = ENV . fetch ( "SENTRY_DSN" , nil )
6+
7+ config . send_default_pii = true
8+
9+ config . enable_logs = true
10+ config . enabled_patches = %i[ logger ]
11+
12+ config . traces_sample_rate = 1.0
13+ config . profiles_sample_rate = 1.0
14+ end
You can’t perform that action at this time.
0 commit comments