Skip to content

Commit

Permalink
misc: Upgrade Sentry gem and enable version tracking (#2213)
Browse files Browse the repository at this point in the history
## Description

This PR: 
- Upgrades Sentry gems to 5.18.0
- Enhance the details sent to Sentry by adding the version and by using
the `SENTRY_TRACES_SAMPLE_RATE` to configure the sample rate sent to
Sentry
  • Loading branch information
vincent-pochet authored Jun 27, 2024
1 parent f639a95 commit eea255b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ gem 'newrelic_rpm'
gem 'opentelemetry-exporter-otlp'
gem 'opentelemetry-instrumentation-all'
gem 'opentelemetry-sdk'
gem 'sentry-rails', '~> 5.12.0'
gem 'sentry-ruby', '~> 5.12.0'
gem 'sentry-sidekiq', '~> 5.12.0'
gem 'sentry-rails', '~> 5.18.0'
gem 'sentry-ruby', '~> 5.18.0'
gem 'sentry-sidekiq', '~> 5.18.0'

# Storage
gem 'aws-sdk-s3', require: false
Expand Down
17 changes: 9 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -760,13 +760,14 @@ GEM
scenic (1.7.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
sentry-rails (5.12.0)
sentry-rails (5.18.0)
railties (>= 5.0)
sentry-ruby (~> 5.12.0)
sentry-ruby (5.12.0)
sentry-ruby (~> 5.18.0)
sentry-ruby (5.18.0)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
sentry-sidekiq (5.12.0)
sentry-ruby (~> 5.12.0)
sentry-sidekiq (5.18.0)
sentry-ruby (~> 5.18.0)
sidekiq (>= 3.0)
shellany (0.0.1)
shoulda-matchers (6.2.0)
Expand Down Expand Up @@ -928,9 +929,9 @@ DEPENDENCIES
ruby-lsp-rails
sass-rails
scenic
sentry-rails (~> 5.12.0)
sentry-ruby (~> 5.12.0)
sentry-sidekiq (~> 5.12.0)
sentry-rails (~> 5.18.0)
sentry-ruby (~> 5.18.0)
sentry-sidekiq (~> 5.18.0)
shoulda-matchers
sidekiq
simplecov
Expand Down
2 changes: 2 additions & 0 deletions config/initializers/sentry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
if ENV['SENTRY_DSN']
Sentry.init do |config|
config.dsn = ENV['SENTRY_DSN']
config.release = LAGO_VERSION.number
config.breadcrumbs_logger = %i[active_support_logger http_logger]
config.traces_sample_rate = 0
config.traces_sample_rate = ENV['SENTRY_TRACES_SAMPLE_RATE'].to_f || 0
config.environment = ENV['SENTRY_ENVIRONMENT'] || Rails.env
end
end

0 comments on commit eea255b

Please sign in to comment.