Skip to content

Commit 4f3901b

Browse files
committed
Add sentry
1 parent af2bcc5 commit 4f3901b

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,6 @@ gem "tailwindcss-rails", "~> 3.1"
9292
gem "dockerfile-rails", ">= 1.7", group: :development
9393

9494
gem "redis", "~> 5.3"
95+
96+
gem "sentry-ruby"
97+
gem "sentry-rails"

Gemfile.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,12 @@ GEM
338338
rexml (~> 3.2, >= 3.2.5)
339339
rubyzip (>= 1.2.2, < 3.0)
340340
websocket (~> 1.0)
341+
sentry-rails (5.21.0)
342+
railties (>= 5.0)
343+
sentry-ruby (~> 5.21.0)
344+
sentry-ruby (5.21.0)
345+
bigdecimal
346+
concurrent-ruby (~> 1.0, >= 1.0.2)
341347
sprockets (4.2.1)
342348
concurrent-ruby (~> 1.0)
343349
rack (>= 2.2.4, < 4)
@@ -434,6 +440,8 @@ DEPENDENCIES
434440
rubocop-rails-omakase
435441
ruby-openai (~> 7.3)
436442
selenium-webdriver
443+
sentry-rails
444+
sentry-ruby
437445
sprockets-rails
438446
sqlite3 (>= 1.4)
439447
stimulus-rails

config/initializers/sentry.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# frozen_string_literal: true
2+
3+
Sentry.init do |config|
4+
config.breadcrumbs_logger = [ :active_support_logger, :http_logger ]
5+
config.dsn = ENV["SENTRY_DSN"]
6+
config.enable_tracing = true
7+
config.traces_sample_rate = 0.1
8+
config.profiles_sample_rate = 0.01
9+
config.enabled_environments = %w[production]
10+
end

0 commit comments

Comments
 (0)