Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ AWS_BUCKET=<insert aws bucket here>
AWS_ACCESS_KEY_ID=<insert aws access key>
AWS_SECRET_ACCESS_KEY=<insert aws secret access>
EXECJS_RUNTIME=Node
SENTRY_DSN=<insert sentry dsn here>
8 changes: 8 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,12 @@ group :development do
gem "spring-watcher-listen", "~> 2.1.0"
end

# Exception tracking. Reports unhandled exceptions to Sentry in production;
# the DSN is supplied via the SENTRY_DSN env var (see .env.sample). sentry-rails
# auto-installs the Rack/Rails middleware, so no controller changes are needed.
group :production do
gem "sentry-ruby"
gem "sentry-rails"
end

gem "tzinfo-data", platforms: [:windows, :jruby]
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,13 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sentry-rails (6.6.2)
railties (>= 5.2.0)
sentry-ruby (~> 6.6.2)
sentry-ruby (6.6.2)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
logger
spring (4.7.0)
spring-watcher-listen (2.1.0)
listen (>= 2.7, < 4.0)
Expand Down Expand Up @@ -438,6 +445,8 @@ DEPENDENCIES
rubocop-rails-omakase
sass-rails (~> 6.0)
selenium-webdriver
sentry-rails
sentry-ruby
spring
spring-watcher-listen (~> 2.1.0)
terser
Expand Down
9 changes: 9 additions & 0 deletions Gemfile.next.lock
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,13 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sentry-rails (6.6.2)
railties (>= 5.2.0)
sentry-ruby (~> 6.6.2)
sentry-ruby (6.6.2)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
logger
spring (4.7.0)
spring-watcher-listen (2.1.0)
listen (>= 2.7, < 4.0)
Expand Down Expand Up @@ -438,6 +445,8 @@ DEPENDENCIES
rubocop-rails-omakase
sass-rails (~> 6.0)
selenium-webdriver
sentry-rails
sentry-ruby
spring
spring-watcher-listen (~> 2.1.0)
terser
Expand Down
10 changes: 10 additions & 0 deletions config/initializers/sentry.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if Rails.env.production? && ENV["SENTRY_DSN"].present?
Sentry.init do |config|
config.dsn = ENV["SENTRY_DSN"]
config.breadcrumbs_logger = [:active_support_logger, :http_logger]

# Capture 100% of transactions for performance tracing. Lower this if the
# volume becomes noisy or the Sentry quota gets tight.
config.traces_sample_rate = 1.0
end
end
Loading