upgrade sentry gems, enable async and disable performance analyses

This commit is contained in:
2021-08-13 19:30:34 +02:00
parent 7350e3760b
commit 1dc925ee9e
4 changed files with 27 additions and 19 deletions

View File

@@ -41,8 +41,9 @@ gem 'omniauth-rails_csrf_protection', '~> 1.0.0'
# A Ruby wrapper around Blizzard's Game Data and Profile APIs # A Ruby wrapper around Blizzard's Game Data and Profile APIs
gem 'rbattlenet', '~> 2.2.9', git: 'https://github.com/Dainii/rbattlenet' gem 'rbattlenet', '~> 2.2.9', git: 'https://github.com/Dainii/rbattlenet'
# A gem that provides Rails integration for the Sentry error logger # A gem that provides Rails integration for the Sentry error logger
gem 'sentry-rails', '~> 4.4.0' gem 'sentry-rails', '~> 4.6.5'
gem 'sentry-ruby', '~> 4.4.2' gem 'sentry-ruby', '~> 4.6.5'
gem 'sentry-sidekiq', '~> 4.6.5'
# Simple, efficient background processing for Ruby # Simple, efficient background processing for Ruby
gem 'sidekiq', '~> 6.2.1' gem 'sidekiq', '~> 6.2.1'
# Agnostic pagination in plain ruby # Agnostic pagination in plain ruby

View File

@@ -164,7 +164,7 @@ GEM
activesupport (>= 4) activesupport (>= 4)
railties (>= 4) railties (>= 4)
request_store (~> 1.0) request_store (~> 1.0)
loofah (2.11.0) loofah (2.12.0)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
mail (2.7.1) mail (2.7.1)
@@ -181,7 +181,7 @@ GEM
multi_xml (0.6.0) multi_xml (0.6.0)
multipart-post (2.1.1) multipart-post (2.1.1)
nio4r (2.5.8) nio4r (2.5.8)
nokogiri (1.12.2-x86_64-linux) nokogiri (1.12.3-x86_64-linux)
racc (~> 1.4) racc (~> 1.4)
oauth2 (1.4.7) oauth2 (1.4.7)
faraday (>= 0.8, < 2.0) faraday (>= 0.8, < 2.0)
@@ -327,16 +327,19 @@ GEM
childprocess (>= 0.5, < 4.0) childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2) rubyzip (>= 1.2.2)
semantic_range (3.0.0) semantic_range (3.0.0)
sentry-rails (4.4.0) sentry-rails (4.6.5)
railties (>= 5.0) railties (>= 5.0)
sentry-ruby-core (~> 4.4.0.pre.beta) sentry-ruby-core (~> 4.6.0)
sentry-ruby (4.4.2) sentry-ruby (4.6.5)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
faraday (>= 1.0) faraday (>= 1.0)
sentry-ruby-core (= 4.4.2) sentry-ruby-core (= 4.6.5)
sentry-ruby-core (4.4.2) sentry-ruby-core (4.6.5)
concurrent-ruby concurrent-ruby
faraday faraday
sentry-sidekiq (4.6.5)
sentry-ruby-core (~> 4.6.0)
sidekiq (>= 3.0)
sidekiq (6.2.1) sidekiq (6.2.1)
connection_pool (>= 2.2.2) connection_pool (>= 2.2.2)
rack (~> 2.0) rack (~> 2.0)
@@ -438,8 +441,9 @@ DEPENDENCIES
rubocop-rails rubocop-rails
sass-rails (>= 6) sass-rails (>= 6)
selenium-webdriver selenium-webdriver
sentry-rails (~> 4.4.0) sentry-rails (~> 4.6.5)
sentry-ruby (~> 4.4.2) sentry-ruby (~> 4.6.5)
sentry-sidekiq (~> 4.6.5)
sidekiq (~> 6.2.1) sidekiq (~> 6.2.1)
simplecov simplecov
solargraph solargraph

View 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

View File

@@ -1,13 +1,7 @@
Sentry.init do |config| Sentry.init do |config|
config.dsn = ENV['SENTRY_DSN'] config.dsn = ENV['SENTRY_DSN']
config.breadcrumbs_logger = [:active_support_logger]
# Set tracesSampleRate to 1.0 to capture 100% config.async = lambda do |event, hint|
# of transactions for performance monitoring. SentryWorker.perform_async(event, hint)
# We recommend adjusting this value in production
config.traces_sample_rate = 1.0
# or
config.traces_sampler = lambda do |context|
true
end end
end end