🔥

railsでsentry導入

2021/06/02に公開

状況

  • rails

やりたいこと

  • バグを可視化したい

sentry導入

Gemfile
gem "sentry-ruby"
gem "sentry-rails"
config/initializers/sentry.rb
Sentry.init do |config|
  config.dsn = 'https://examplePublicKey@o0.ingest.sentry.io/0' # ここは書き換えが必要
  config.breadcrumbs_logger = [:active_support_logger]

  # To activate performance monitoring, set one of these options.
  # We recommend adjusting the value in production:
  config.traces_sample_rate = 0.5
  # or
  config.traces_sampler = lambda do |context|
    true
  end
end

Discussion

ログインするとコメントできます