upgrade sentry gems, enable async and disable performance analyses
This commit is contained in:
5
Gemfile
5
Gemfile
@@ -41,8 +41,9 @@ gem 'omniauth-rails_csrf_protection', '~> 1.0.0'
|
||||
# A Ruby wrapper around Blizzard's Game Data and Profile APIs
|
||||
gem 'rbattlenet', '~> 2.2.9', git: 'https://github.com/Dainii/rbattlenet'
|
||||
# A gem that provides Rails integration for the Sentry error logger
|
||||
gem 'sentry-rails', '~> 4.4.0'
|
||||
gem 'sentry-ruby', '~> 4.4.2'
|
||||
gem 'sentry-rails', '~> 4.6.5'
|
||||
gem 'sentry-ruby', '~> 4.6.5'
|
||||
gem 'sentry-sidekiq', '~> 4.6.5'
|
||||
# Simple, efficient background processing for Ruby
|
||||
gem 'sidekiq', '~> 6.2.1'
|
||||
# Agnostic pagination in plain ruby
|
||||
|
||||
22
Gemfile.lock
22
Gemfile.lock
@@ -164,7 +164,7 @@ GEM
|
||||
activesupport (>= 4)
|
||||
railties (>= 4)
|
||||
request_store (~> 1.0)
|
||||
loofah (2.11.0)
|
||||
loofah (2.12.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.7.1)
|
||||
@@ -181,7 +181,7 @@ GEM
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.1.1)
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.12.2-x86_64-linux)
|
||||
nokogiri (1.12.3-x86_64-linux)
|
||||
racc (~> 1.4)
|
||||
oauth2 (1.4.7)
|
||||
faraday (>= 0.8, < 2.0)
|
||||
@@ -327,16 +327,19 @@ GEM
|
||||
childprocess (>= 0.5, < 4.0)
|
||||
rubyzip (>= 1.2.2)
|
||||
semantic_range (3.0.0)
|
||||
sentry-rails (4.4.0)
|
||||
sentry-rails (4.6.5)
|
||||
railties (>= 5.0)
|
||||
sentry-ruby-core (~> 4.4.0.pre.beta)
|
||||
sentry-ruby (4.4.2)
|
||||
sentry-ruby-core (~> 4.6.0)
|
||||
sentry-ruby (4.6.5)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
faraday (>= 1.0)
|
||||
sentry-ruby-core (= 4.4.2)
|
||||
sentry-ruby-core (4.4.2)
|
||||
sentry-ruby-core (= 4.6.5)
|
||||
sentry-ruby-core (4.6.5)
|
||||
concurrent-ruby
|
||||
faraday
|
||||
sentry-sidekiq (4.6.5)
|
||||
sentry-ruby-core (~> 4.6.0)
|
||||
sidekiq (>= 3.0)
|
||||
sidekiq (6.2.1)
|
||||
connection_pool (>= 2.2.2)
|
||||
rack (~> 2.0)
|
||||
@@ -438,8 +441,9 @@ DEPENDENCIES
|
||||
rubocop-rails
|
||||
sass-rails (>= 6)
|
||||
selenium-webdriver
|
||||
sentry-rails (~> 4.4.0)
|
||||
sentry-ruby (~> 4.4.2)
|
||||
sentry-rails (~> 4.6.5)
|
||||
sentry-ruby (~> 4.6.5)
|
||||
sentry-sidekiq (~> 4.6.5)
|
||||
sidekiq (~> 6.2.1)
|
||||
simplecov
|
||||
solargraph
|
||||
|
||||
9
app/workers/sentry_worker.rb
Normal file
9
app/workers/sentry_worker.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class SentryWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(event, hint)
|
||||
Sentry.send_event(event, hint)
|
||||
end
|
||||
end
|
||||
@@ -1,13 +1,7 @@
|
||||
Sentry.init do |config|
|
||||
config.dsn = ENV['SENTRY_DSN']
|
||||
config.breadcrumbs_logger = [:active_support_logger]
|
||||
|
||||
# Set tracesSampleRate to 1.0 to capture 100%
|
||||
# of transactions for performance monitoring.
|
||||
# We recommend adjusting this value in production
|
||||
config.traces_sample_rate = 1.0
|
||||
# or
|
||||
config.traces_sampler = lambda do |context|
|
||||
true
|
||||
config.async = lambda do |event, hint|
|
||||
SentryWorker.perform_async(event, hint)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user