Browse Source

Add sentry configuration (#289)

pull/292/head
Stéphane Meny 3 years ago committed by GitHub
parent
commit
14e429759b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .github/workflows/pipeline.yml
  2. 3
      Gemfile
  3. 10
      Gemfile.lock
  4. 5
      config/initializers/sentry.rb

4
.github/workflows/pipeline.yml

@ -123,6 +123,8 @@ jobs:
APP_HOST: ${{ secrets.APP_HOST }}
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
IMPORT_PAAS_INSTANCE: ${{ secrets.IMPORT_PAAS_INSTANCE }}
EXPORT_PAAS_INSTANCE: ${{ secrets.EXPORT_PAAS_INSTANCE }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
run: |
cf7 api $CF_API_ENDPOINT
cf7 auth
@ -133,4 +135,6 @@ jobs:
cf7 set-env $APP_NAME APP_HOST $APP_HOST
cf7 set-env $APP_NAME RAILS_MASTER_KEY $RAILS_MASTER_KEY
cf7 set-env $APP_NAME IMPORT_PAAS_INSTANCE $IMPORT_PAAS_INSTANCE
cf7 set-env $APP_NAME EXPORT_PAAS_INSTANCE $EXPORT_PAAS_INSTANCE
cf7 set-env $APP_NAME SENTRY_DSN $SENTRY_DSN
cf7 push $APP_NAME --strategy rolling

3
Gemfile

@ -49,6 +49,9 @@ gem "aws-sdk-s3"
gem "paper_trail"
# Store active record objects in version whodunnits
gem "paper_trail-globalid"
# Receive exceptions and configure alerts
gem "sentry-rails"
gem "sentry-ruby"
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console

10
Gemfile.lock

@ -402,6 +402,14 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2)
semantic_range (3.0.0)
sentry-rails (5.0.2)
railties (>= 5.0)
sentry-ruby-core (~> 5.0.2)
sentry-ruby (5.0.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
sentry-ruby-core (= 5.0.2)
sentry-ruby-core (5.0.2)
concurrent-ruby
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
@ -487,6 +495,8 @@ DEPENDENCIES
rubocop-rails
scss_lint-govuk
selenium-webdriver
sentry-rails
sentry-ruby
simplecov
timecop (~> 0.9.4)
two_factor_authentication!

5
config/initializers/sentry.rb

@ -0,0 +1,5 @@
Sentry.init do |config|
config.breadcrumbs_logger = %i[active_support_logger http_logger]
config.enabled_environments = %w[production staging]
config.traces_sample_rate = 0.5
end
Loading…
Cancel
Save