sentry-raven 2.11.2 → 2.13.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 +5 -5
- data/.travis.yml +5 -5
- data/README.md +1 -1
- data/changelog.md +35 -0
- data/lib/raven/base.rb +1 -1
- data/lib/raven/client.rb +16 -3
- data/lib/raven/event.rb +1 -7
- data/lib/raven/instance.rb +8 -0
- data/lib/raven/integrations/delayed_job.rb +2 -2
- data/lib/raven/integrations/rails/active_job.rb +6 -4
- data/lib/raven/processor/utf8conversion.rb +1 -1
- data/lib/raven/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 478a0cd677f1508fc2153381addf6956e189c5f9491ede8f79b6097977dd59b9
|
4
|
+
data.tar.gz: d87fe2f303acf7e1d8b658950a1e591800eaf8a0f8bbdd35637355ac6856f571
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c83298b6f11a500e50f4e530de5421f32d15f7ea72d3a6aea18cd4330f832073a2000a68228b0237313e709b3e4adba570b140837256798ff3987b9eb0bb0fc9
|
7
|
+
data.tar.gz: 80405a6c1d1f99a7b65ed9491bd17c0d4143a5d5f212c6408988c9de329bc2bee2f2c6c1421d6134cc7f3d4c23ed2da06d0ba76509f6ae191f0236e83c53bdf8
|
data/.travis.yml
CHANGED
@@ -12,9 +12,9 @@ branches:
|
|
12
12
|
rvm:
|
13
13
|
- 2.2.10
|
14
14
|
- 2.3.8
|
15
|
-
- 2.4.
|
16
|
-
- 2.5.
|
17
|
-
- 2.6.
|
15
|
+
- 2.4.9
|
16
|
+
- 2.5.7
|
17
|
+
- 2.6.5
|
18
18
|
|
19
19
|
env:
|
20
20
|
- RAILS_VERSION=4
|
@@ -37,9 +37,9 @@ matrix:
|
|
37
37
|
env: RAILS_VERSION=4
|
38
38
|
- rvm: jruby-1.7.27
|
39
39
|
env: JRUBY_OPTS="--dev" RAILS_VERSION=4
|
40
|
-
- rvm: jruby-9.2.
|
40
|
+
- rvm: jruby-9.2.9.0
|
41
41
|
env: JRUBY_OPTS="--dev -J-Djruby.launch.inproc=true -J-Xmx1024M" RAILS_VERSION=4
|
42
|
-
- rvm: jruby-9.2.
|
42
|
+
- rvm: jruby-9.2.9.0
|
43
43
|
env: JRUBY_OPTS="--dev -J-Djruby.launch.inproc=true -J-Xmx1024M" RAILS_VERSION=5
|
44
44
|
- rvm: ruby-head
|
45
45
|
env: RAILS_VERSION=0
|
data/README.md
CHANGED
@@ -133,4 +133,4 @@ For more information, see [Context](https://docs.sentry.io/clients/ruby/context/
|
|
133
133
|
* [Documentation](https://docs.sentry.io/clients/ruby/)
|
134
134
|
* [Bug Tracker](https://github.com/getsentry/raven-ruby/issues)
|
135
135
|
* [Forum](https://forum.sentry.io/)
|
136
|
-
|
136
|
+
- [Discord](https://discord.gg/ez5KZN7)
|
data/changelog.md
CHANGED
@@ -1,3 +1,38 @@
|
|
1
|
+
2.13.0
|
2
|
+
----
|
3
|
+
|
4
|
+
* FIX: Sanitize event data before they are sent to async job. [@edariedl, #895]
|
5
|
+
* FIX: Serialization MongoDB ObjectId to JSON problem with gem delayed_job_mongoid conjunction. [@eagleas, #935]
|
6
|
+
* FEAT: Skip ActiveJob integration if there is a better one [@fsateler, #909]
|
7
|
+
* FIX: Bugs with send_event in asynchronous mode (#940) [@cstyles, #940]
|
8
|
+
|
9
|
+
2.12.3
|
10
|
+
----
|
11
|
+
|
12
|
+
* FIX: crash when Process.wait is used [@asBrettisay, #895]
|
13
|
+
|
14
|
+
2.12.2
|
15
|
+
----
|
16
|
+
|
17
|
+
* FIX: return tags/extra for [@rivayama, #931]
|
18
|
+
|
19
|
+
2.12.1
|
20
|
+
----
|
21
|
+
|
22
|
+
* FIX: undefined method `[]' for nil:NilClass [@HazAT, #932]
|
23
|
+
|
24
|
+
2.12.0
|
25
|
+
----
|
26
|
+
|
27
|
+
* FIX: Remove duplicate message when exception is emitted
|
28
|
+
* FIX: Frozen string bug in utf8conversation
|
29
|
+
* FEATURE: Allow block on tags_context and extra_context
|
30
|
+
|
31
|
+
2.11.3
|
32
|
+
----
|
33
|
+
|
34
|
+
* FIX: infinite backoff under pressure [@Bonias, #886]
|
35
|
+
|
1
36
|
2.11.2
|
2
37
|
----
|
3
38
|
|
data/lib/raven/base.rb
CHANGED
@@ -100,7 +100,7 @@ module Raven
|
|
100
100
|
|
101
101
|
def sys_command(command)
|
102
102
|
result = `#{command} 2>&1` rescue nil
|
103
|
-
return if result.nil? || result.empty? || $CHILD_STATUS.exitstatus != 0
|
103
|
+
return if result.nil? || result.empty? || ($CHILD_STATUS && $CHILD_STATUS.exitstatus != 0)
|
104
104
|
result.strip
|
105
105
|
end
|
106
106
|
end
|
data/lib/raven/client.rb
CHANGED
@@ -35,7 +35,8 @@ module Raven
|
|
35
35
|
return
|
36
36
|
end
|
37
37
|
|
38
|
-
|
38
|
+
event_id = event[:event_id] || event['event_id']
|
39
|
+
configuration.logger.info "Sending event #{event_id} to Sentry"
|
39
40
|
|
40
41
|
content_type, encoded_data = encode(event)
|
41
42
|
|
@@ -79,8 +80,20 @@ module Raven
|
|
79
80
|
end
|
80
81
|
end
|
81
82
|
|
83
|
+
def get_message_from_exception(event)
|
84
|
+
(
|
85
|
+
event &&
|
86
|
+
event[:exception] &&
|
87
|
+
event[:exception][:values] &&
|
88
|
+
event[:exception][:values][0] &&
|
89
|
+
event[:exception][:values][0][:type] &&
|
90
|
+
event[:exception][:values][0][:value] &&
|
91
|
+
"#{event[:exception][:values][0][:type]}: #{event[:exception][:values][0][:value]}"
|
92
|
+
)
|
93
|
+
end
|
94
|
+
|
82
95
|
def get_log_message(event)
|
83
|
-
(event && event[:message]) || '<no message value>'
|
96
|
+
(event && event[:message]) || (event && event['message']) || get_message_from_exception(event) || '<no message value>'
|
84
97
|
end
|
85
98
|
|
86
99
|
def generate_auth_header
|
@@ -100,8 +113,8 @@ module Raven
|
|
100
113
|
end
|
101
114
|
|
102
115
|
def failed_send(e, event)
|
103
|
-
@state.failure
|
104
116
|
if e # exception was raised
|
117
|
+
@state.failure
|
105
118
|
configuration.logger.warn "Unable to record event with remote Sentry server (#{e.class} - #{e.message}):\n#{e.backtrace[0..10].join("\n")}"
|
106
119
|
else
|
107
120
|
configuration.logger.warn "Not sending event due to previous failure(s)."
|
data/lib/raven/event.rb
CHANGED
@@ -59,10 +59,7 @@ module Raven
|
|
59
59
|
return unless configuration.exception_class_allowed?(exc)
|
60
60
|
|
61
61
|
new(options) do |evt|
|
62
|
-
evt.message = "#{exc.class}: #{exc.message}"
|
63
|
-
|
64
62
|
evt.add_exception_interface(exc)
|
65
|
-
|
66
63
|
yield evt if block
|
67
64
|
end
|
68
65
|
end
|
@@ -231,10 +228,7 @@ module Raven
|
|
231
228
|
end
|
232
229
|
|
233
230
|
def async_json_processors
|
234
|
-
|
235
|
-
Raven::Processor::RemoveCircularReferences,
|
236
|
-
Raven::Processor::UTF8Conversion
|
237
|
-
].map { |v| v.new(self) }
|
231
|
+
configuration.processors.map { |v| v.new(self) }
|
238
232
|
end
|
239
233
|
|
240
234
|
def list_gem_specs
|
data/lib/raven/instance.rb
CHANGED
@@ -183,6 +183,10 @@ module Raven
|
|
183
183
|
# Raven.tags_context('my_custom_tag' => 'tag_value')
|
184
184
|
def tags_context(options = nil)
|
185
185
|
context.tags.merge!(options || {})
|
186
|
+
yield if block_given?
|
187
|
+
context.tags
|
188
|
+
ensure
|
189
|
+
context.tags.delete_if { |k, _| options.keys.include? k } if block_given?
|
186
190
|
end
|
187
191
|
|
188
192
|
# Bind extra context. Merges with existing context (if any).
|
@@ -194,6 +198,10 @@ module Raven
|
|
194
198
|
# Raven.extra_context('my_custom_data' => 'value')
|
195
199
|
def extra_context(options = nil)
|
196
200
|
context.extra.merge!(options || {})
|
201
|
+
yield if block_given?
|
202
|
+
context.extra
|
203
|
+
ensure
|
204
|
+
context.extra.delete_if { |k, _| options.keys.include? k } if block_given?
|
197
205
|
end
|
198
206
|
|
199
207
|
def rack_context(env)
|
@@ -13,7 +13,7 @@ module Delayed
|
|
13
13
|
# Log error to Sentry
|
14
14
|
extra = {
|
15
15
|
:delayed_job => {
|
16
|
-
:id => job.id,
|
16
|
+
:id => job.id.to_s,
|
17
17
|
:priority => job.priority,
|
18
18
|
:attempts => job.attempts,
|
19
19
|
:run_at => job.run_at,
|
@@ -36,7 +36,7 @@ module Delayed
|
|
36
36
|
:logger => 'delayed_job',
|
37
37
|
:tags => {
|
38
38
|
:delayed_job_queue => job.queue,
|
39
|
-
:delayed_job_id => job.id
|
39
|
+
:delayed_job_id => job.id.to_s
|
40
40
|
},
|
41
41
|
:extra => extra)
|
42
42
|
|
@@ -9,7 +9,11 @@ module Raven
|
|
9
9
|
def self.included(base)
|
10
10
|
base.class_eval do
|
11
11
|
around_perform do |job, block|
|
12
|
-
|
12
|
+
if already_supported_by_specific_integration?(job)
|
13
|
+
block.call
|
14
|
+
else
|
15
|
+
capture_and_reraise_with_sentry(job, block)
|
16
|
+
end
|
13
17
|
end
|
14
18
|
end
|
15
19
|
end
|
@@ -18,9 +22,7 @@ module Raven
|
|
18
22
|
block.call
|
19
23
|
rescue Exception => exception # rubocop:disable Lint/RescueException
|
20
24
|
return if rescue_with_handler(exception)
|
21
|
-
|
22
|
-
Raven.capture_exception(exception, :extra => raven_context(job))
|
23
|
-
end
|
25
|
+
Raven.capture_exception(exception, :extra => raven_context(job))
|
24
26
|
raise exception
|
25
27
|
ensure
|
26
28
|
Context.clear!
|
@@ -39,7 +39,7 @@ module Raven
|
|
39
39
|
# https://github.com/rspec/rspec-support/blob/f0af3fd74a94ff7bb700f6ba06dbdc67bba17fbf/lib/rspec/support/encoded_string.rb#L120-L139
|
40
40
|
if String.method_defined?(:scrub) # 2.1+
|
41
41
|
def remove_invalid_bytes(string)
|
42
|
-
string.scrub
|
42
|
+
string.scrub(REPLACE)
|
43
43
|
end
|
44
44
|
else
|
45
45
|
def remove_invalid_bytes(string)
|
data/lib/raven/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sentry-raven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -121,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
|
-
|
125
|
-
rubygems_version: 2.5.2.3
|
124
|
+
rubygems_version: 3.0.3
|
126
125
|
signing_key:
|
127
126
|
specification_version: 4
|
128
127
|
summary: A gem that provides a client interface for the Sentry error logger
|