airbrake 9.5.0 → 11.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/airbrake.rb +2 -0
- data/lib/airbrake/capistrano.rb +2 -0
- data/lib/airbrake/capistrano/capistrano2.rb +2 -0
- data/lib/airbrake/capistrano/capistrano3.rb +3 -1
- data/lib/airbrake/delayed_job.rb +24 -6
- data/lib/airbrake/logger.rb +2 -0
- data/lib/airbrake/rack.rb +4 -0
- data/lib/airbrake/rack/context_filter.rb +9 -2
- data/lib/airbrake/rack/http_headers_filter.rb +7 -5
- data/lib/airbrake/rack/http_params_filter.rb +2 -0
- data/lib/airbrake/rack/instrumentable.rb +112 -4
- data/lib/airbrake/rack/middleware.rb +3 -1
- data/lib/airbrake/rack/request_body_filter.rb +2 -0
- data/lib/airbrake/rack/request_store.rb +2 -0
- data/lib/airbrake/rack/route_filter.rb +8 -10
- data/lib/airbrake/rack/session_filter.rb +2 -0
- data/lib/airbrake/rack/user.rb +4 -0
- data/lib/airbrake/rack/user_filter.rb +2 -0
- data/lib/airbrake/rails.rb +8 -8
- data/lib/airbrake/rails/action_cable.rb +2 -0
- data/lib/airbrake/rails/action_cable/notify_callback.rb +2 -0
- data/lib/airbrake/rails/action_controller.rb +5 -0
- data/lib/airbrake/rails/action_controller_notify_subscriber.rb +6 -2
- data/lib/airbrake/rails/action_controller_performance_breakdown_subscriber.rb +6 -1
- data/lib/airbrake/rails/action_controller_route_subscriber.rb +8 -21
- data/lib/airbrake/rails/active_job.rb +25 -8
- data/lib/airbrake/rails/active_record.rb +2 -0
- data/lib/airbrake/rails/active_record_subscriber.rb +7 -3
- data/lib/airbrake/rails/app.rb +60 -25
- data/lib/airbrake/rails/backtrace_cleaner.rb +13 -0
- data/lib/airbrake/rails/curb.rb +19 -22
- data/lib/airbrake/rails/event.rb +4 -6
- data/lib/airbrake/rails/excon_subscriber.rb +4 -0
- data/lib/airbrake/rails/http.rb +2 -0
- data/lib/airbrake/rails/http_client.rb +12 -6
- data/lib/airbrake/rails/net_http.rb +14 -6
- data/lib/airbrake/rails/railtie.rb +55 -45
- data/lib/airbrake/rails/typhoeus.rb +11 -7
- data/lib/airbrake/rake.rb +3 -1
- data/lib/airbrake/rake/tasks.rb +7 -5
- data/lib/airbrake/resque.rb +32 -0
- data/lib/airbrake/shoryuken.rb +17 -3
- data/lib/airbrake/sidekiq.rb +22 -14
- data/lib/airbrake/sidekiq/retryable_jobs_filter.rb +2 -0
- data/lib/airbrake/sneakers.rb +39 -1
- data/lib/airbrake/version.rb +3 -1
- data/lib/generators/airbrake_generator.rb +2 -0
- data/lib/generators/airbrake_initializer.rb.erb +5 -3
- metadata +61 -90
data/lib/airbrake/sneakers.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Airbrake
|
2
4
|
module Sneakers
|
3
5
|
# Provides integration with Sneakers.
|
@@ -10,17 +12,21 @@ module Airbrake
|
|
10
12
|
# @see https://github.com/airbrake/airbrake/issues/850
|
11
13
|
IGNORED_KEYS = %i[delivery_tag consumer channel].freeze
|
12
14
|
|
13
|
-
|
15
|
+
# rubocop:disable Style/OptionalArguments
|
16
|
+
def call(exception, worker = nil, context)
|
17
|
+
# Later versions add a middle argument.
|
14
18
|
Airbrake.notify(exception, filter_context(context)) do |notice|
|
15
19
|
notice[:context][:component] = 'sneakers'
|
16
20
|
notice[:context][:action] = worker.class.to_s
|
17
21
|
end
|
18
22
|
end
|
23
|
+
# rubocop:enable Style/OptionalArguments
|
19
24
|
|
20
25
|
private
|
21
26
|
|
22
27
|
def filter_context(context)
|
23
28
|
return context unless context[:delivery_info]
|
29
|
+
|
24
30
|
h = context.dup
|
25
31
|
h[:delivery_info] = context[:delivery_info].reject do |k, _v|
|
26
32
|
IGNORED_KEYS.include?(k)
|
@@ -32,3 +38,35 @@ module Airbrake
|
|
32
38
|
end
|
33
39
|
|
34
40
|
Sneakers.error_reporters << Airbrake::Sneakers::ErrorReporter.new
|
41
|
+
|
42
|
+
module Sneakers
|
43
|
+
# @todo Migrate to Sneakers v2.12.0 middleware API when it's released
|
44
|
+
# @see https://github.com/jondot/sneakers/pull/364
|
45
|
+
module Worker
|
46
|
+
# Sneakers v2.7.0+ renamed `do_work` to `process_work`.
|
47
|
+
if method_defined?(:process_work)
|
48
|
+
alias process_work_without_airbrake process_work
|
49
|
+
else
|
50
|
+
alias process_work_without_airbrake do_work
|
51
|
+
end
|
52
|
+
|
53
|
+
def process_work(delivery_info, metadata, msg, handler)
|
54
|
+
timing = Airbrake::Benchmark.measure do
|
55
|
+
process_work_without_airbrake(delivery_info, metadata, msg, handler)
|
56
|
+
end
|
57
|
+
rescue Exception => exception # rubocop:disable Lint/RescueException
|
58
|
+
Airbrake.notify_queue(
|
59
|
+
queue: self.class.to_s,
|
60
|
+
error_count: 1,
|
61
|
+
timing: 0.01,
|
62
|
+
)
|
63
|
+
raise exception
|
64
|
+
else
|
65
|
+
Airbrake.notify_queue(
|
66
|
+
queue: self.class.to_s,
|
67
|
+
error_count: 0,
|
68
|
+
timing: timing,
|
69
|
+
)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
data/lib/airbrake/version.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Airbrake is an online tool that provides robust exception tracking in your Rails
|
2
4
|
# applications. In doing so, it allows you to easily review errors, tie an error
|
3
5
|
# to an individual piece of code, and trace the cause back to recent
|
@@ -52,12 +54,12 @@ Airbrake.configure do |c|
|
|
52
54
|
# A list of parameters that should be filtered out of what is sent to
|
53
55
|
# Airbrake. By default, all "password" attributes will have their contents
|
54
56
|
# replaced.
|
55
|
-
# https://github.com/airbrake/airbrake-ruby#
|
56
|
-
c.
|
57
|
+
# https://github.com/airbrake/airbrake-ruby#blocklist_keys
|
58
|
+
c.blocklist_keys = [/password/i, /authorization/i]
|
57
59
|
|
58
60
|
# Alternatively, you can integrate with Rails' filter_parameters.
|
59
61
|
# Read more: https://goo.gl/gqQ1xS
|
60
|
-
# c.
|
62
|
+
# c.blocklist_keys = Rails.application.config.filter_parameters
|
61
63
|
end
|
62
64
|
|
63
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.1
|
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:
|
11
|
+
date: 2020-10-20 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.1'
|
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.1'
|
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,68 +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
181
|
- !ruby/object:Gem::Dependency
|
244
182
|
name: sidekiq
|
245
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -324,6 +262,40 @@ dependencies:
|
|
324
262
|
- - "~>"
|
325
263
|
- !ruby/object:Gem::Version
|
326
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
|
327
299
|
description: |
|
328
300
|
Airbrake is an online tool that provides robust exception tracking in any of
|
329
301
|
your Ruby applications. In doing so, it allows you to easily review errors, tie
|
@@ -392,7 +364,7 @@ homepage: https://airbrake.io
|
|
392
364
|
licenses:
|
393
365
|
- MIT
|
394
366
|
metadata: {}
|
395
|
-
post_install_message:
|
367
|
+
post_install_message:
|
396
368
|
rdoc_options: []
|
397
369
|
require_paths:
|
398
370
|
- lib
|
@@ -400,16 +372,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
400
372
|
requirements:
|
401
373
|
- - ">="
|
402
374
|
- !ruby/object:Gem::Version
|
403
|
-
version: '2.
|
375
|
+
version: '2.3'
|
404
376
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
405
377
|
requirements:
|
406
378
|
- - ">="
|
407
379
|
- !ruby/object:Gem::Version
|
408
380
|
version: '0'
|
409
381
|
requirements: []
|
410
|
-
|
411
|
-
|
412
|
-
signing_key:
|
382
|
+
rubygems_version: 3.1.2
|
383
|
+
signing_key:
|
413
384
|
specification_version: 4
|
414
385
|
summary: Airbrake is an online tool that provides robust exception tracking in any
|
415
386
|
of your Ruby applications.
|