Add sentry for error tracing

This commit is contained in:
Sebastian Serth
2020-01-14 14:38:43 +01:00
parent 54a2a0df6e
commit a551760965
3 changed files with 28 additions and 4 deletions

View File

@ -3,7 +3,6 @@ source 'https://rubygems.org'
gem 'bcrypt'
gem 'bootstrap-will_paginate'
gem 'carrierwave'
gem 'concurrent-ruby'
gem 'docker-api', require: 'docker'
gem 'factory_bot_rails'
gem 'forgery'
@ -12,7 +11,6 @@ gem 'jbuilder'
gem 'jquery-rails'
gem 'ims-lti', '< 2.0.0'
gem 'kramdown'
gem 'newrelic_rpm'
gem 'pg'
gem 'pry-byebug'
gem 'puma'
@ -35,12 +33,17 @@ gem 'nokogiri'
gem 'webpacker'
gem 'rest-client'
gem 'rubyzip'
gem 'mnemosyne-ruby'
gem 'faraday'
gem 'proforma', git: 'https://github.com/openHPI/proforma.git', tag: 'v0.4'
gem 'whenever', require: false
gem 'rails-timeago'
# Error Tracing
gem 'concurrent-ruby'
gem 'mnemosyne-ruby'
gem 'newrelic_rpm'
gem 'sentry-raven'
group :development, :staging do
gem 'bootsnap', require: false
gem 'listen'

View File

@ -151,7 +151,7 @@ GEM
factory_bot_rails (5.1.1)
factory_bot (~> 5.1.0)
railties (>= 4.2.0)
faraday (1.0.0)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
faye-websocket (0.10.9)
eventmachine (>= 0.12.0)
@ -368,6 +368,8 @@ GEM
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
sentry-raven (2.13.0)
faraday (>= 0.7.6, < 1.0)
shoulda-matchers (4.2.0)
activesupport (>= 4.2.0)
simplecov (0.17.1)
@ -499,6 +501,7 @@ DEPENDENCIES
rubyzip
sass-rails
selenium-webdriver
sentry-raven
shoulda-matchers
simplecov
slim-rails

View File

@ -0,0 +1,18 @@
# frozen_string_literal: true
require 'concurrent'
Rails.application.tap do |app|
pool = ::Concurrent::ThreadPoolExecutor.new(max_queue: 10)
Raven.configure do |config|
config.sanitize_fields = app.config.filter_parameters.map(&:to_s)
config.async = lambda do |event|
pool.post { ::Raven.send_event(event) }
end
# Do not sent full list of gems with each event
config.send_modules = false
end
end