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
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,8 @@ group :test do
gem "capybara"
gem "selenium-webdriver"
end

group :production do
gem "sentry-ruby"
gem "sentry-rails"
end
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,12 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sentry-rails (5.26.0)
railties (>= 5.0)
sentry-ruby (~> 5.26.0)
sentry-ruby (5.26.0)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
sidekiq (7.3.9)
base64
connection_pool (>= 2.3.0)
Expand Down Expand Up @@ -489,6 +495,8 @@ DEPENDENCIES
rails (~> 8.0.2)
rubocop-rails-omakase
selenium-webdriver
sentry-rails
sentry-ruby
sidekiq
sidekiq-scheduler
slack-ruby-block-kit (>= 0.24.0)
Expand Down
5 changes: 4 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<%# Includes all stylesheet files in app/assets/stylesheets %>
<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
<%= javascript_importmap_tags %>
<% if Rails.env.production? %>
<%= Sentry.get_trace_propagation_meta.html_safe %>
<% end %>
</head>

<body>
Expand All @@ -28,7 +31,7 @@
<% end %>
</div>
<% end %>

<%= yield %>
</body>
</html>
9 changes: 9 additions & 0 deletions config/initializers/sentry.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

if Rails.env.production?
Sentry.init do |config|
config.breadcrumbs_logger = [ :active_support_logger ]
config.dsn = ENV["SENTRY_DSN"]
config.traces_sample_rate = 1.0
end
end