mirror of
https://github.com/internetee/registry.git
synced 2025-06-13 08:04:45 +02:00
Merge pull request #1297 from internetee/tune-airbrake-gem
Tune airbrake gem
This commit is contained in:
commit
46d24f770e
3 changed files with 23 additions and 25 deletions
|
@ -106,9 +106,10 @@ GEM
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
addressable (2.6.0)
|
addressable (2.6.0)
|
||||||
public_suffix (>= 2.0.2, < 4.0)
|
public_suffix (>= 2.0.2, < 4.0)
|
||||||
airbrake (6.0.0)
|
airbrake (9.4.3)
|
||||||
airbrake-ruby (~> 2.0)
|
airbrake-ruby (~> 4.6)
|
||||||
airbrake-ruby (2.0.0)
|
airbrake-ruby (4.6.0)
|
||||||
|
rbtree3 (~> 0.5)
|
||||||
akami (1.3.1)
|
akami (1.3.1)
|
||||||
gyoku (>= 0.4.0)
|
gyoku (>= 0.4.0)
|
||||||
nokogiri
|
nokogiri
|
||||||
|
@ -336,6 +337,7 @@ GEM
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
i18n
|
i18n
|
||||||
polyamorous (~> 1.1)
|
polyamorous (~> 1.1)
|
||||||
|
rbtree3 (0.5.0)
|
||||||
rdoc (4.3.0)
|
rdoc (4.3.0)
|
||||||
regexp_parser (1.5.1)
|
regexp_parser (1.5.1)
|
||||||
request_store (1.4.1)
|
request_store (1.4.1)
|
||||||
|
|
18
config/initializers/airbrake.rb
Normal file
18
config/initializers/airbrake.rb
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
Airbrake.configure do |config|
|
||||||
|
config.host = ENV['airbrake_host']
|
||||||
|
config.project_id = ENV['airbrake_project_id']
|
||||||
|
config.project_key = ENV['airbrake_project_key']
|
||||||
|
config.root_directory = Rails.root
|
||||||
|
config.logger =
|
||||||
|
if ENV['RAILS_LOG_TO_STDOUT'].present?
|
||||||
|
Logger.new(STDOUT, level: Rails.logger.level)
|
||||||
|
else
|
||||||
|
Logger.new(
|
||||||
|
Rails.root.join('log', 'airbrake.log'),
|
||||||
|
level: Rails.logger.level
|
||||||
|
)
|
||||||
|
end
|
||||||
|
config.environment = ENV['airbrake_env'] || Rails.env
|
||||||
|
config.ignore_environments = %w[test]
|
||||||
|
config.blacklist_keys = Rails.application.config.filter_parameters
|
||||||
|
end
|
|
@ -1,22 +0,0 @@
|
||||||
module Patches
|
|
||||||
module Airbrake
|
|
||||||
module SyncSender
|
|
||||||
def build_https(uri)
|
|
||||||
super.tap do |req|
|
|
||||||
req.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Airbrake::SyncSender.prepend(::Patches::Airbrake::SyncSender)
|
|
||||||
|
|
||||||
Airbrake.configure do |config|
|
|
||||||
config.host = ENV['airbrake_host']
|
|
||||||
config.project_id = ENV['airbrake_project_id']
|
|
||||||
config.project_key = ENV['airbrake_project_key']
|
|
||||||
|
|
||||||
config.environment = ENV['airbrake_env'] || Rails.env
|
|
||||||
config.ignore_environments = %w(development test)
|
|
||||||
end
|
|
Loading…
Add table
Add a link
Reference in a new issue