airbrake 10.0.2 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/airbrake/capistrano/capistrano3.rb +1 -1
- data/lib/airbrake/delayed_job.rb +2 -2
- data/lib/airbrake/rack.rb +2 -0
- data/lib/airbrake/rack/http_headers_filter.rb +4 -4
- data/lib/airbrake/rack/instrumentable.rb +5 -5
- data/lib/airbrake/rack/route_filter.rb +2 -0
- data/lib/airbrake/rack/user.rb +2 -0
- data/lib/airbrake/rails/action_controller.rb +3 -0
- data/lib/airbrake/rails/action_controller_notify_subscriber.rb +2 -0
- data/lib/airbrake/rails/action_controller_performance_breakdown_subscriber.rb +2 -0
- data/lib/airbrake/rails/action_controller_route_subscriber.rb +2 -0
- data/lib/airbrake/rails/active_job.rb +2 -2
- data/lib/airbrake/rails/active_record_subscriber.rb +2 -0
- data/lib/airbrake/rails/app.rb +22 -0
- data/lib/airbrake/rails/backtrace_cleaner.rb +11 -0
- data/lib/airbrake/rails/curb.rb +18 -23
- data/lib/airbrake/rails/event.rb +1 -1
- data/lib/airbrake/rails/excon_subscriber.rb +2 -0
- data/lib/airbrake/rails/http_client.rb +11 -7
- data/lib/airbrake/rails/railtie.rb +47 -42
- data/lib/airbrake/rails/typhoeus.rb +10 -8
- data/lib/airbrake/rake/tasks.rb +1 -1
- data/lib/airbrake/sidekiq.rb +2 -1
- data/lib/airbrake/sneakers.rb +1 -0
- data/lib/airbrake/version.rb +1 -1
- data/lib/generators/airbrake_initializer.rb.erb +3 -3
- metadata +60 -116
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81da57e8a5a47cfafd0a69d4d4c89e100301ba4c5e48418866ce584a95fe3632
|
4
|
+
data.tar.gz: c24d6f44c8eae4ad946471098620b16c6973d9272b0363f2420305b35374b7a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95b80ba3b1bf3771695c22fc28511a44347a4c8b841fc51d80f5abe14eb204147502f22599c2663a69f8b95986e1dd0cc7c026983957ecedb1761df4ab4311f5
|
7
|
+
data.tar.gz: 0dc035ee0b9b791eb13b2b7be401e46b5ab4fb5b906f5b180123b4bd9d4e3fd3a83439ffafe29e0371e39e71697575b0790992e5f240349b5113ad26a47b1dbf
|
data/lib/airbrake/delayed_job.rb
CHANGED
@@ -28,7 +28,7 @@ module Delayed
|
|
28
28
|
notice[:context][:action] = action
|
29
29
|
end
|
30
30
|
|
31
|
-
::Airbrake.
|
31
|
+
::Airbrake.notify_queue(
|
32
32
|
queue: action,
|
33
33
|
error_count: 1,
|
34
34
|
timing: 0.01,
|
@@ -36,7 +36,7 @@ module Delayed
|
|
36
36
|
|
37
37
|
raise exception
|
38
38
|
else
|
39
|
-
::Airbrake.
|
39
|
+
::Airbrake.notify_queue(
|
40
40
|
queue: job_class || job.payload_object.class.name,
|
41
41
|
error_count: 0,
|
42
42
|
timing: timing,
|
data/lib/airbrake/rack.rb
CHANGED
@@ -8,10 +8,10 @@ module Airbrake
|
|
8
8
|
class HttpHeadersFilter
|
9
9
|
# @return [Array<String>] the prefixes of the majority of HTTP headers in
|
10
10
|
# Rack (some prefixes match the header names for simplicity)
|
11
|
-
HTTP_HEADER_PREFIXES = [
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
HTTP_HEADER_PREFIXES = %w[
|
12
|
+
HTTP_
|
13
|
+
CONTENT_TYPE
|
14
|
+
CONTENT_LENGTH
|
15
15
|
].freeze
|
16
16
|
|
17
17
|
# @return [Integer]
|
@@ -98,11 +98,11 @@ module Airbrake
|
|
98
98
|
def self.method_visibility(klass, method_name)
|
99
99
|
klass.module_exec do
|
100
100
|
if protected_method_defined?(method_name)
|
101
|
-
"protected"
|
101
|
+
"protected"
|
102
102
|
elsif private_method_defined?(method_name)
|
103
|
-
"private"
|
103
|
+
"private"
|
104
104
|
else
|
105
|
-
"public"
|
105
|
+
"public"
|
106
106
|
end
|
107
107
|
end
|
108
108
|
end
|
@@ -111,11 +111,11 @@ module Airbrake
|
|
111
111
|
# A method instead of a constant so it isn't accessible in the target.
|
112
112
|
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.7")
|
113
113
|
def self.method_signature
|
114
|
-
"*args, **kw_args, &block"
|
114
|
+
"*args, **kw_args, &block"
|
115
115
|
end
|
116
116
|
else
|
117
117
|
def self.method_signature
|
118
|
-
"*args, &block"
|
118
|
+
"*args, &block"
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
@@ -28,11 +28,13 @@ module Airbrake
|
|
28
28
|
|
29
29
|
def rails_route(request)
|
30
30
|
return unless (route = Airbrake::Rails::App.recognize_route(request))
|
31
|
+
|
31
32
|
route.path
|
32
33
|
end
|
33
34
|
|
34
35
|
def sinatra_route(request)
|
35
36
|
return unless (route = request.env['sinatra.route'])
|
37
|
+
|
36
38
|
route.split(' ').drop(1).join(' ')
|
37
39
|
end
|
38
40
|
|
data/lib/airbrake/rack/user.rb
CHANGED
@@ -28,6 +28,7 @@ module Airbrake
|
|
28
28
|
controller = rack_env['action_controller.instance']
|
29
29
|
return unless controller.respond_to?(:current_user, true)
|
30
30
|
return unless [-1, 0].include?(controller.method(:current_user).arity)
|
31
|
+
|
31
32
|
begin
|
32
33
|
controller.__send__(:current_user)
|
33
34
|
rescue Exception => _e # rubocop:disable Lint/RescueException
|
@@ -59,6 +60,7 @@ module Airbrake
|
|
59
60
|
# try methods with no arguments or with variable number of arguments,
|
60
61
|
# where none of them are required
|
61
62
|
return unless @user.method(key).arity.between?(-1, 0)
|
63
|
+
|
62
64
|
String(@user.__send__(key))
|
63
65
|
end
|
64
66
|
|
@@ -14,6 +14,7 @@ module Airbrake
|
|
14
14
|
# @see Airbrake#notify, #notify_airbrake_sync
|
15
15
|
def notify_airbrake(exception, params = {}, &block)
|
16
16
|
return unless (notice = build_notice(exception, params))
|
17
|
+
|
17
18
|
Airbrake.notify(notice, params, &block)
|
18
19
|
end
|
19
20
|
|
@@ -22,6 +23,7 @@ module Airbrake
|
|
22
23
|
# @see Airbrake#notify_sync, #notify_airbrake
|
23
24
|
def notify_airbrake_sync(exception, params = {}, &block)
|
24
25
|
return unless (notice = build_notice(exception, params))
|
26
|
+
|
25
27
|
Airbrake.notify_sync(notice, params, &block)
|
26
28
|
end
|
27
29
|
|
@@ -29,6 +31,7 @@ module Airbrake
|
|
29
31
|
# @return [Airbrake::Notice] the notice with information from the Rack env
|
30
32
|
def build_notice(exception, params = {})
|
31
33
|
return unless (notice = Airbrake.build_notice(exception, params))
|
34
|
+
|
32
35
|
notice.stash[:rack_request] = request
|
33
36
|
notice
|
34
37
|
end
|
@@ -11,6 +11,8 @@ module Airbrake
|
|
11
11
|
# @since v8.0.0
|
12
12
|
class ActionControllerRouteSubscriber
|
13
13
|
def call(*args)
|
14
|
+
return unless Airbrake::Config.instance.performance_stats
|
15
|
+
|
14
16
|
# We don't track routeless events.
|
15
17
|
return unless (routes = Airbrake::Rack::RequestStore[:routes])
|
16
18
|
|
@@ -22,14 +22,14 @@ module Airbrake
|
|
22
22
|
block.call
|
23
23
|
end
|
24
24
|
rescue StandardError => exception
|
25
|
-
Airbrake.
|
25
|
+
Airbrake.notify_queue(
|
26
26
|
queue: job.class.name,
|
27
27
|
error_count: 1,
|
28
28
|
timing: 0.01,
|
29
29
|
)
|
30
30
|
raise exception
|
31
31
|
else
|
32
|
-
Airbrake.
|
32
|
+
Airbrake.notify_queue(
|
33
33
|
queue: job.class.name,
|
34
34
|
error_count: 0,
|
35
35
|
timing: timing,
|
data/lib/airbrake/rails/app.rb
CHANGED
@@ -11,12 +11,19 @@ module Airbrake
|
|
11
11
|
|
12
12
|
# @param [] request
|
13
13
|
# @return [Airbrake::Rails::App::Route, nil]
|
14
|
+
# rubocop:disable Metrics/AbcSize
|
14
15
|
def self.recognize_route(request)
|
15
16
|
# Duplicate `request` because `recognize` *can* strip the request's
|
16
17
|
# `path_info`, which results in broken engine links (when the engine has
|
17
18
|
# an isolated namespace).
|
18
19
|
request_copy = request.dup
|
19
20
|
|
21
|
+
# Save original script name because `router.recognize(request)` mutates
|
22
|
+
# it. It's a Rails bug. More info in:
|
23
|
+
# * https://github.com/airbrake/airbrake/issues/1072
|
24
|
+
# * https://github.com/rails/rails/issues/31152
|
25
|
+
original_script_name = request.env['SCRIPT_NAME']
|
26
|
+
|
20
27
|
# We must search every engine individually to find a concrete route. If
|
21
28
|
# we rely only on the `Rails.application.routes.router`, then the
|
22
29
|
# recognize call would return the root route, neglecting PATH_INFO
|
@@ -26,6 +33,20 @@ module Airbrake
|
|
26
33
|
# * `Marketing::Engine` recognizes it as `marketing#/pricing` (correct)
|
27
34
|
engines.each do |engine|
|
28
35
|
engine.routes.router.recognize(request_copy) do |route, _params|
|
36
|
+
# Restore original script name. Remove this code when/if the Rails
|
37
|
+
# bug is fixed: https://github.com/airbrake/airbrake/issues/1072
|
38
|
+
request.env['SCRIPT_NAME'] = original_script_name
|
39
|
+
|
40
|
+
# Skip "catch-all" routes such as:
|
41
|
+
# get '*path => 'pages#about'
|
42
|
+
#
|
43
|
+
# @todo The `glob?` method was added in Rails v4.2.0.beta1. We
|
44
|
+
# should remove the `respond_to?` check once we drop old Rails
|
45
|
+
# versions support.
|
46
|
+
#
|
47
|
+
# https://github.com/rails/rails/commit/5460591f0226a9d248b7b4f89186bd5553e7768f
|
48
|
+
next if route.respond_to?(:glob?) && route.glob?
|
49
|
+
|
29
50
|
path =
|
30
51
|
if engine == ::Rails.application
|
31
52
|
route.path.spec.to_s
|
@@ -46,6 +67,7 @@ module Airbrake
|
|
46
67
|
|
47
68
|
nil
|
48
69
|
end
|
70
|
+
# rubocop:enable Metrics/AbcSize
|
49
71
|
|
50
72
|
def self.engines
|
51
73
|
@engines ||= [*::Rails::Engine.subclasses, ::Rails.application]
|
@@ -4,9 +4,20 @@ module Airbrake
|
|
4
4
|
module Rails
|
5
5
|
# BacktraceCleaner is a wrapper around Rails.backtrace_cleaner.
|
6
6
|
class BacktraceCleaner
|
7
|
+
# @return [Regexp]
|
8
|
+
AIRBRAKE_FRAME_PATTERN = %r{/airbrake/lib/airbrake/}.freeze
|
9
|
+
|
7
10
|
def self.clean(backtrace)
|
8
11
|
::Rails.backtrace_cleaner.clean(backtrace).first(1)
|
9
12
|
end
|
10
13
|
end
|
11
14
|
end
|
12
15
|
end
|
16
|
+
|
17
|
+
if defined?(Rails)
|
18
|
+
# Silence own frames to let the cleaner proceed to the next line (and probably
|
19
|
+
# find the correct call-site coming from the app code rather this library).
|
20
|
+
Rails.backtrace_cleaner.add_silencer do |line|
|
21
|
+
line =~ Airbrake::Rails::BacktraceCleaner::AIRBRAKE_FRAME_PATTERN
|
22
|
+
end
|
23
|
+
end
|
data/lib/airbrake/rails/curb.rb
CHANGED
@@ -1,37 +1,32 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
module Airbrake
|
4
|
+
module Rails
|
5
|
+
# Allows measuring request timing.
|
6
|
+
module CurlEasy
|
7
|
+
def http(verb)
|
8
|
+
Airbrake::Rack.capture_timing(:http) do
|
9
|
+
super(verb)
|
10
|
+
end
|
11
11
|
end
|
12
|
-
end
|
13
|
-
|
14
|
-
alias perform_without_airbrake perform
|
15
12
|
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
def perform(&block)
|
14
|
+
Airbrake::Rack.capture_timing(:http) do
|
15
|
+
super(&block)
|
16
|
+
end
|
19
17
|
end
|
20
18
|
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
module Curl
|
25
|
-
# Monkey-patch to measure request timing.
|
26
|
-
class Multi
|
27
|
-
class << self
|
28
|
-
alias http_without_airbrake http
|
29
19
|
|
20
|
+
# Allows measuring request timing.
|
21
|
+
module CurlMulti
|
30
22
|
def http(urls_with_config, multi_options = {}, &block)
|
31
23
|
Airbrake::Rack.capture_timing(:http) do
|
32
|
-
|
24
|
+
super(urls_with_config, multi_options, &block)
|
33
25
|
end
|
34
26
|
end
|
35
27
|
end
|
36
28
|
end
|
37
29
|
end
|
30
|
+
|
31
|
+
Curl::Easy.prepend(Airbrake::Rails::CurlEasy)
|
32
|
+
Curl::Multi.singleton_class.prepend(Airbrake::Rails::CurlMulti)
|
data/lib/airbrake/rails/event.rb
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
module Airbrake
|
4
|
+
module Rails
|
5
|
+
# Allows measuring request timing.
|
6
|
+
module HTTPClient
|
7
|
+
def do_get_block(request, proxy, connection, &block)
|
8
|
+
Airbrake::Rack.capture_timing(:http) do
|
9
|
+
super(request, proxy, connection, &block)
|
10
|
+
end
|
11
|
+
end
|
10
12
|
end
|
11
13
|
end
|
12
14
|
end
|
15
|
+
|
16
|
+
HTTPClient.prepend(Airbrake::Rails::HTTPClient)
|
@@ -5,8 +5,10 @@ module Airbrake
|
|
5
5
|
# This railtie works for any Rails application that supports railties (Rails
|
6
6
|
# 3.2+ apps). It makes Airbrake Ruby work with Rails and report errors
|
7
7
|
# occurring in the application automatically.
|
8
|
+
#
|
9
|
+
# rubocop:disable Metrics/BlockLength
|
8
10
|
class Railtie < ::Rails::Railtie
|
9
|
-
initializer('airbrake.middleware'
|
11
|
+
initializer('airbrake.middleware') do |app|
|
10
12
|
# Since Rails 3.2 the ActionDispatch::DebugExceptions middleware is
|
11
13
|
# responsible for logging exceptions and showing a debugging page in
|
12
14
|
# case the request is local. We want to insert our middleware after
|
@@ -44,7 +46,6 @@ module Airbrake
|
|
44
46
|
require 'airbrake/rake/tasks'
|
45
47
|
end
|
46
48
|
|
47
|
-
# rubocop:disable Metrics/BlockLength
|
48
49
|
initializer('airbrake.action_controller') do
|
49
50
|
ActiveSupport.on_load(:action_controller, run_once: true) do
|
50
51
|
# Patches ActionController with methods that allow us to retrieve
|
@@ -52,47 +53,40 @@ module Airbrake
|
|
52
53
|
require 'airbrake/rails/action_controller'
|
53
54
|
include Airbrake::Rails::ActionController
|
54
55
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
)
|
62
|
-
|
63
|
-
# Send route stats.
|
64
|
-
require 'airbrake/rails/action_controller_notify_subscriber'
|
65
|
-
ActiveSupport::Notifications.subscribe(
|
66
|
-
'process_action.action_controller',
|
67
|
-
Airbrake::Rails::ActionControllerNotifySubscriber.new,
|
68
|
-
)
|
69
|
-
|
70
|
-
# Send performance breakdown: where a request spends its time.
|
71
|
-
require 'airbrake/rails/action_controller_performance_breakdown_subscriber'
|
72
|
-
ActiveSupport::Notifications.subscribe(
|
73
|
-
'process_action.action_controller',
|
74
|
-
Airbrake::Rails::ActionControllerPerformanceBreakdownSubscriber.new,
|
75
|
-
)
|
56
|
+
# Cache route information for the duration of the request.
|
57
|
+
require 'airbrake/rails/action_controller_route_subscriber'
|
58
|
+
ActiveSupport::Notifications.subscribe(
|
59
|
+
'start_processing.action_controller',
|
60
|
+
Airbrake::Rails::ActionControllerRouteSubscriber.new,
|
61
|
+
)
|
76
62
|
|
77
|
-
|
63
|
+
# Send route stats.
|
64
|
+
require 'airbrake/rails/action_controller_notify_subscriber'
|
65
|
+
ActiveSupport::Notifications.subscribe(
|
66
|
+
'process_action.action_controller',
|
67
|
+
Airbrake::Rails::ActionControllerNotifySubscriber.new,
|
68
|
+
)
|
78
69
|
|
79
|
-
|
80
|
-
|
81
|
-
|
70
|
+
# Send performance breakdown: where a request spends its time.
|
71
|
+
require 'airbrake/rails/action_controller_performance_breakdown_subscriber'
|
72
|
+
ActiveSupport::Notifications.subscribe(
|
73
|
+
'process_action.action_controller',
|
74
|
+
Airbrake::Rails::ActionControllerPerformanceBreakdownSubscriber.new,
|
75
|
+
)
|
82
76
|
|
83
|
-
|
84
|
-
|
85
|
-
|
77
|
+
require 'airbrake/rails/net_http' if defined?(Net) && defined?(Net::HTTP)
|
78
|
+
require 'airbrake/rails/curb' if defined?(Curl) && defined?(Curl::CURB_VERSION)
|
79
|
+
require 'airbrake/rails/http' if defined?(HTTP) && defined?(HTTP::Client)
|
80
|
+
require 'airbrake/rails/http_client' if defined?(HTTPClient)
|
81
|
+
require 'airbrake/rails/typhoeus' if defined?(Typhoeus)
|
86
82
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
end
|
83
|
+
if defined?(Excon)
|
84
|
+
require 'airbrake/rails/excon_subscriber'
|
85
|
+
ActiveSupport::Notifications.subscribe(/excon/, Airbrake::Rails::Excon.new)
|
86
|
+
::Excon.defaults[:instrumentor] = ActiveSupport::Notifications
|
92
87
|
end
|
93
88
|
end
|
94
89
|
end
|
95
|
-
# rubocop:enable Metrics/BlockLength
|
96
90
|
|
97
91
|
initializer('airbrake.active_record') do
|
98
92
|
ActiveSupport.on_load(:active_record, run_once: true) do
|
@@ -104,7 +98,7 @@ module Airbrake
|
|
104
98
|
include Airbrake::Rails::ActiveRecord
|
105
99
|
end
|
106
100
|
|
107
|
-
if defined?(ActiveRecord)
|
101
|
+
if defined?(ActiveRecord)
|
108
102
|
# Send SQL queries.
|
109
103
|
require 'airbrake/rails/active_record_subscriber'
|
110
104
|
ActiveSupport::Notifications.subscribe(
|
@@ -112,11 +106,21 @@ module Airbrake
|
|
112
106
|
)
|
113
107
|
|
114
108
|
# Filter out parameters from SQL body.
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
109
|
+
if ::ActiveRecord::Base.respond_to?(:connection_db_config)
|
110
|
+
# Rails 6.1+ deprecates "connection_config" in favor of
|
111
|
+
# "connection_db_config", so we need an updated call.
|
112
|
+
Airbrake.add_performance_filter(
|
113
|
+
Airbrake::Filters::SqlFilter.new(
|
114
|
+
::ActiveRecord::Base.connection_db_config.configuration_hash[:adapter],
|
115
|
+
),
|
116
|
+
)
|
117
|
+
else
|
118
|
+
Airbrake.add_performance_filter(
|
119
|
+
Airbrake::Filters::SqlFilter.new(
|
120
|
+
::ActiveRecord::Base.connection_config[:adapter],
|
121
|
+
),
|
122
|
+
)
|
123
|
+
end
|
120
124
|
end
|
121
125
|
end
|
122
126
|
end
|
@@ -142,5 +146,6 @@ module Airbrake
|
|
142
146
|
end
|
143
147
|
end
|
144
148
|
end
|
149
|
+
# rubocop:enable Metrics/BlockLength
|
145
150
|
end
|
146
151
|
end
|
@@ -1,14 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
module Airbrake
|
4
|
+
module Rails
|
5
|
+
# Allow measuring request timing.
|
6
|
+
module TyphoeusRequest
|
7
|
+
def run
|
8
|
+
Airbrake::Rack.capture_timing(:http) do
|
9
|
+
super
|
10
|
+
end
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
15
|
+
|
16
|
+
Typhoeus::Request.prepend(Airbrake::Rails::TyphoeusRequest)
|
data/lib/airbrake/rake/tasks.rb
CHANGED
@@ -71,7 +71,7 @@ namespace :airbrake do
|
|
71
71
|
app = ENV['HEROKU_APP']
|
72
72
|
|
73
73
|
config = Bundler.with_clean_env do
|
74
|
-
`heroku config --shell#{
|
74
|
+
`heroku config --shell#{" --app #{app}" if app}`
|
75
75
|
end
|
76
76
|
|
77
77
|
heroku_env = config.each_line.with_object({}) do |line, h|
|
data/lib/airbrake/sidekiq.rb
CHANGED
@@ -29,7 +29,7 @@ module Airbrake
|
|
29
29
|
private
|
30
30
|
|
31
31
|
def notify_airbrake(exception, context)
|
32
|
-
Airbrake.notify(exception, context) do |notice|
|
32
|
+
Airbrake.notify(exception, job: context) do |notice|
|
33
33
|
notice[:context][:component] = 'sidekiq'
|
34
34
|
notice[:context][:action] = action(context)
|
35
35
|
end
|
@@ -41,6 +41,7 @@ module Airbrake
|
|
41
41
|
klass = context['class'] || context[:job] && context[:job]['class']
|
42
42
|
return klass unless context[:job] && context[:job]['args'].first.is_a?(Hash)
|
43
43
|
return klass unless (job_class = context[:job]['args'].first['job_class'])
|
44
|
+
|
44
45
|
job_class
|
45
46
|
end
|
46
47
|
end
|
data/lib/airbrake/sneakers.rb
CHANGED
data/lib/airbrake/version.rb
CHANGED
@@ -54,12 +54,12 @@ Airbrake.configure do |c|
|
|
54
54
|
# A list of parameters that should be filtered out of what is sent to
|
55
55
|
# Airbrake. By default, all "password" attributes will have their contents
|
56
56
|
# replaced.
|
57
|
-
# https://github.com/airbrake/airbrake-ruby#
|
58
|
-
c.
|
57
|
+
# https://github.com/airbrake/airbrake-ruby#blocklist_keys
|
58
|
+
c.blocklist_keys = [/password/i, /authorization/i]
|
59
59
|
|
60
60
|
# Alternatively, you can integrate with Rails' filter_parameters.
|
61
61
|
# Read more: https://goo.gl/gqQ1xS
|
62
|
-
# c.
|
62
|
+
# c.blocklist_keys = Rails.application.config.filter_parameters
|
63
63
|
end
|
64
64
|
|
65
65
|
# A filter that collects request body information. Enable it if you are sure you
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 11.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airbrake Technologies, Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: airbrake-ruby
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '5.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,72 +84,72 @@ dependencies:
|
|
84
84
|
name: appraisal
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rack
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '2'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '2'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: webmock
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '3'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '3'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: amq-protocol
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: sneakers
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 2
|
145
|
+
version: '2'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 2
|
152
|
+
version: '2'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rack-test
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,96 +178,6 @@ dependencies:
|
|
178
178
|
- - '='
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: 3.3.3
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: public_suffix
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - "~>"
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '2.0'
|
188
|
-
- - "<"
|
189
|
-
- !ruby/object:Gem::Version
|
190
|
-
version: '3.0'
|
191
|
-
type: :development
|
192
|
-
prerelease: false
|
193
|
-
version_requirements: !ruby/object:Gem::Requirement
|
194
|
-
requirements:
|
195
|
-
- - "~>"
|
196
|
-
- !ruby/object:Gem::Version
|
197
|
-
version: '2.0'
|
198
|
-
- - "<"
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
version: '3.0'
|
201
|
-
- !ruby/object:Gem::Dependency
|
202
|
-
name: nokogiri
|
203
|
-
requirement: !ruby/object:Gem::Requirement
|
204
|
-
requirements:
|
205
|
-
- - '='
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
version: 1.9.1
|
208
|
-
type: :development
|
209
|
-
prerelease: false
|
210
|
-
version_requirements: !ruby/object:Gem::Requirement
|
211
|
-
requirements:
|
212
|
-
- - '='
|
213
|
-
- !ruby/object:Gem::Version
|
214
|
-
version: 1.9.1
|
215
|
-
- !ruby/object:Gem::Dependency
|
216
|
-
name: parallel
|
217
|
-
requirement: !ruby/object:Gem::Requirement
|
218
|
-
requirements:
|
219
|
-
- - '='
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: 1.13.0
|
222
|
-
type: :development
|
223
|
-
prerelease: false
|
224
|
-
version_requirements: !ruby/object:Gem::Requirement
|
225
|
-
requirements:
|
226
|
-
- - '='
|
227
|
-
- !ruby/object:Gem::Version
|
228
|
-
version: 1.13.0
|
229
|
-
- !ruby/object:Gem::Dependency
|
230
|
-
name: minitest
|
231
|
-
requirement: !ruby/object:Gem::Requirement
|
232
|
-
requirements:
|
233
|
-
- - '='
|
234
|
-
- !ruby/object:Gem::Version
|
235
|
-
version: 5.11.3
|
236
|
-
type: :development
|
237
|
-
prerelease: false
|
238
|
-
version_requirements: !ruby/object:Gem::Requirement
|
239
|
-
requirements:
|
240
|
-
- - '='
|
241
|
-
- !ruby/object:Gem::Version
|
242
|
-
version: 5.11.3
|
243
|
-
- !ruby/object:Gem::Dependency
|
244
|
-
name: rack-cache
|
245
|
-
requirement: !ruby/object:Gem::Requirement
|
246
|
-
requirements:
|
247
|
-
- - '='
|
248
|
-
- !ruby/object:Gem::Version
|
249
|
-
version: 1.9.0
|
250
|
-
type: :development
|
251
|
-
prerelease: false
|
252
|
-
version_requirements: !ruby/object:Gem::Requirement
|
253
|
-
requirements:
|
254
|
-
- - '='
|
255
|
-
- !ruby/object:Gem::Version
|
256
|
-
version: 1.9.0
|
257
|
-
- !ruby/object:Gem::Dependency
|
258
|
-
name: redis-namespace
|
259
|
-
requirement: !ruby/object:Gem::Requirement
|
260
|
-
requirements:
|
261
|
-
- - '='
|
262
|
-
- !ruby/object:Gem::Version
|
263
|
-
version: 1.6.0
|
264
|
-
type: :development
|
265
|
-
prerelease: false
|
266
|
-
version_requirements: !ruby/object:Gem::Requirement
|
267
|
-
requirements:
|
268
|
-
- - '='
|
269
|
-
- !ruby/object:Gem::Version
|
270
|
-
version: 1.6.0
|
271
181
|
- !ruby/object:Gem::Dependency
|
272
182
|
name: sidekiq
|
273
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -352,6 +262,40 @@ dependencies:
|
|
352
262
|
- - "~>"
|
353
263
|
- !ruby/object:Gem::Version
|
354
264
|
version: '1.3'
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: public_suffix
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - "~>"
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: '2.0'
|
272
|
+
- - "<"
|
273
|
+
- !ruby/object:Gem::Version
|
274
|
+
version: '3.0'
|
275
|
+
type: :development
|
276
|
+
prerelease: false
|
277
|
+
version_requirements: !ruby/object:Gem::Requirement
|
278
|
+
requirements:
|
279
|
+
- - "~>"
|
280
|
+
- !ruby/object:Gem::Version
|
281
|
+
version: '2.0'
|
282
|
+
- - "<"
|
283
|
+
- !ruby/object:Gem::Version
|
284
|
+
version: '3.0'
|
285
|
+
- !ruby/object:Gem::Dependency
|
286
|
+
name: redis-namespace
|
287
|
+
requirement: !ruby/object:Gem::Requirement
|
288
|
+
requirements:
|
289
|
+
- - '='
|
290
|
+
- !ruby/object:Gem::Version
|
291
|
+
version: 1.6.0
|
292
|
+
type: :development
|
293
|
+
prerelease: false
|
294
|
+
version_requirements: !ruby/object:Gem::Requirement
|
295
|
+
requirements:
|
296
|
+
- - '='
|
297
|
+
- !ruby/object:Gem::Version
|
298
|
+
version: 1.6.0
|
355
299
|
description: |
|
356
300
|
Airbrake is an online tool that provides robust exception tracking in any of
|
357
301
|
your Ruby applications. In doing so, it allows you to easily review errors, tie
|
@@ -420,7 +364,7 @@ homepage: https://airbrake.io
|
|
420
364
|
licenses:
|
421
365
|
- MIT
|
422
366
|
metadata: {}
|
423
|
-
post_install_message:
|
367
|
+
post_install_message:
|
424
368
|
rdoc_options: []
|
425
369
|
require_paths:
|
426
370
|
- lib
|
@@ -428,7 +372,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
428
372
|
requirements:
|
429
373
|
- - ">="
|
430
374
|
- !ruby/object:Gem::Version
|
431
|
-
version: '2.
|
375
|
+
version: '2.3'
|
432
376
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
433
377
|
requirements:
|
434
378
|
- - ">="
|
@@ -436,7 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
436
380
|
version: '0'
|
437
381
|
requirements: []
|
438
382
|
rubygems_version: 3.1.2
|
439
|
-
signing_key:
|
383
|
+
signing_key:
|
440
384
|
specification_version: 4
|
441
385
|
summary: Airbrake is an online tool that provides robust exception tracking in any
|
442
386
|
of your Ruby applications.
|