Skip to content

Commit

Permalink
Add Sentry for real
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNaessens committed May 19, 2024
1 parent 03c4364 commit 143ab3d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ gem 'cancancan'
gem 'httparty'

# Glitchtip
gem 'sentry-rails'
gem 'stackprof'
gem 'sentry-ruby'
gem 'sentry-rails'

# Logging is awesome, and paper_trail even more
gem 'paper_trail'
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ GEM
net-scp (>= 1.1.2)
net-sftp (>= 2.1.2)
net-ssh (>= 2.8.0)
stackprof (0.2.26)
stringio (3.1.0)
strscan (3.1.0)
thor (1.3.1)
Expand Down Expand Up @@ -532,6 +533,7 @@ DEPENDENCIES
simple_form
simple_token_authentication
spreadsheet
stackprof
tinymce-rails
turbolinks
twitter-typeahead-rails
Expand Down
16 changes: 14 additions & 2 deletions config/initializers/sentry.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Sentry.init do |config|
config.dsn = ENV["SENTRY_DSN"]
config.breadcrumbs_logger = [:active_support_logger, :http_logger]
config.enabled_environments = %w[production]
config.debug = ENV.fetch("SENTRY_DEBUG", false)

# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
# We recommend adjusting this value in production.
config.traces_sample_rate = 1.0
# or
config.traces_sampler = lambda do |context|
true
end

# Set profiles_sample_rate to profile 100%
# of sampled transactions.
# We recommend adjusting this value in production.
config.profiles_sample_rate = 1.0
end

0 comments on commit 143ab3d

Please sign in to comment.