sentry-raven 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sentry-raven might be problematic. Click here for more details.
- checksums.yaml +8 -8
- data/lib/raven/base.rb +4 -3
- data/lib/raven/integrations/delayed_job.rb +39 -41
- data/lib/raven/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzIzNTdmZTFhMzczN2Y0N2FmYzI2MzU3NDNlYzAyNzQzYTZlYjNjNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzY2NzdmMGUyMTFjNzE5ODNhOGYxYWUzNGIyMDZmYjdjYTZkOWJiMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmM5NjIzYWM0MjMwNWMyMWU5M2E0NjdiZTViOGY4OTM5YzA2ODVmZjBkYjM1
|
10
|
+
NTYzZDA0ZmI2OGU4N2IxZGU1NDJkZTM1YmFlYWViOTgxMTViZDc0ODE4ZTU1
|
11
|
+
MWU1NmRkZmUzYzNkMmQ2ZmU3MTRmZWMwMWE4ZmUzYTVmYTNlOGE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTM3NDJkZjEzMDg3NWI2MTgzZmMzNGY3ZDQzZmRkODM2ZDZkZWE1NjUyZmU2
|
14
|
+
ZThjZjc1ODQ1NWY3OTQzNTdhZjMzYjA3YTgwMWI2ZGVhNzVlYmYxNjk5ZDA0
|
15
|
+
Zjc5NWJhNmYyM2ZlZjhiMWU5YjMzNmZkYTAzMmI3Zjg1YmVmMjE=
|
data/lib/raven/base.rb
CHANGED
@@ -11,7 +11,6 @@ require 'raven/interfaces/exception'
|
|
11
11
|
require 'raven/interfaces/stack_trace'
|
12
12
|
require 'raven/interfaces/http'
|
13
13
|
require 'raven/processors/sanitizedata'
|
14
|
-
require 'raven/integrations/delayed_job'
|
15
14
|
|
16
15
|
module Raven
|
17
16
|
class << self
|
@@ -197,9 +196,11 @@ module Raven
|
|
197
196
|
self.context.rack_env = env
|
198
197
|
end
|
199
198
|
|
200
|
-
# Injects
|
199
|
+
# Injects various integrations
|
201
200
|
def inject
|
202
|
-
|
201
|
+
# TODO(dcramer): integrations should have a way to opt-out
|
202
|
+
require 'raven/integrations/delayed_job' if defined?(::Delayed::Plugin)
|
203
|
+
require 'raven/railtie' if defined?(::Rails::Railtie)
|
203
204
|
require 'raven/sidekiq' if defined?(Sidekiq)
|
204
205
|
require 'raven/tasks' if defined?(Rake)
|
205
206
|
end
|
@@ -1,51 +1,49 @@
|
|
1
|
-
|
2
|
-
require 'delayed_job'
|
1
|
+
require 'delayed_job'
|
3
2
|
|
4
|
-
|
5
|
-
|
3
|
+
module Delayed
|
4
|
+
module Plugins
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
class Raven < ::Delayed::Plugin
|
7
|
+
callbacks do |lifecycle|
|
8
|
+
lifecycle.around(:invoke_job) do |job, *args, &block|
|
9
|
+
begin
|
10
|
+
# Forward the call to the next callback in the callback chain
|
11
|
+
block.call(job, *args)
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
13
|
+
rescue Exception => exception
|
14
|
+
# Log error to Sentry
|
15
|
+
::Raven.capture_exception(exception,
|
16
|
+
:logger => 'delayed_job',
|
17
|
+
:tags => {
|
18
|
+
:delayed_job_queue => job.queue
|
19
|
+
},
|
20
|
+
:extra => {
|
21
|
+
:delayed_job => {
|
22
|
+
:id => job.id,
|
23
|
+
:priority => job.priority,
|
24
|
+
:attempts => job.attempts,
|
25
|
+
:handler => job.handler,
|
26
|
+
:last_error => job.last_error,
|
27
|
+
:run_at => job.run_at,
|
28
|
+
:locked_at => job.locked_at,
|
29
|
+
#failed_at => job.failed_at,
|
30
|
+
:locked_by => job.locked_by,
|
31
|
+
:queue => job.queue,
|
32
|
+
:created_at => job.created_at
|
33
|
+
}
|
34
|
+
})
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
end
|
36
|
+
# Make sure we propagate the failure!
|
37
|
+
raise exception
|
40
38
|
end
|
41
39
|
end
|
42
40
|
end
|
43
|
-
|
44
41
|
end
|
45
|
-
end
|
46
42
|
|
47
|
-
|
48
|
-
# Register DelayedJob Raven plugin
|
49
|
-
#
|
50
|
-
Delayed::Worker.plugins << Delayed::Plugins::Raven
|
43
|
+
end
|
51
44
|
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Register DelayedJob Raven plugin
|
48
|
+
#
|
49
|
+
Delayed::Worker.plugins << Delayed::Plugins::Raven
|
data/lib/raven/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sentry-raven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Kantrowitz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-06-
|
12
|
+
date: 2014-06-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|