Skip to content

Commit 354ed18

Browse files
etagwerkerABizzinotto
authored andcommitted
Add integration to Sentry
1 parent 38b523f commit 354ed18

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,8 @@ group :test do
7777
gem "capybara"
7878
gem "selenium-webdriver"
7979
end
80+
81+
group :production do
82+
gem "sentry-ruby"
83+
gem "sentry-rails"
84+
end

Gemfile.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,12 @@ GEM
374374
rexml (~> 3.2, >= 3.2.5)
375375
rubyzip (>= 1.2.2, < 3.0)
376376
websocket (~> 1.0)
377+
sentry-rails (5.26.0)
378+
railties (>= 5.0)
379+
sentry-ruby (~> 5.26.0)
380+
sentry-ruby (5.26.0)
381+
bigdecimal
382+
concurrent-ruby (~> 1.0, >= 1.0.2)
377383
sidekiq (7.3.9)
378384
base64
379385
connection_pool (>= 2.3.0)
@@ -489,6 +495,8 @@ DEPENDENCIES
489495
rails (~> 8.0.2)
490496
rubocop-rails-omakase
491497
selenium-webdriver
498+
sentry-rails
499+
sentry-ruby
492500
sidekiq
493501
sidekiq-scheduler
494502
slack-ruby-block-kit (>= 0.24.0)

app/views/layouts/application.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<%# Includes all stylesheet files in app/assets/stylesheets %>
1717
<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
1818
<%= javascript_importmap_tags %>
19+
<%= Sentry.get_trace_propagation_meta.html_safe %>
1920
</head>
2021

2122
<body>

config/initializers/sentry.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
Sentry.init do |config|
4+
config.breadcrumbs_logger = [ :active_support_logger ]
5+
config.dsn = ENV["SENTRY_DSN"]
6+
config.traces_sample_rate = 1.0
7+
end

0 commit comments

Comments
 (0)