sentry-raven 2.6.0 → 2.6.1
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/changelog.md +6 -0
- data/lib/raven/integrations/rack.rb +24 -16
- data/lib/raven/integrations/rails/active_job.rb +1 -0
- data/lib/raven/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 492ac8036f2f1a02ec925196ee01e9e7a8719a0e
|
4
|
+
data.tar.gz: 15769839c7060ad049168680b620fb58f9faa1f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 765c2b840c6b5741be982ef814f907dc214aa77625487856a829e7365748d474ed4d058b46fb29d2afef184de3c0e70e29f87c3504ee518c704d629d57a2389b
|
7
|
+
data.tar.gz: 147881f36841706e57863f9a27f01b289a9207dc14360fd29018c8dd4caba6b8d5adbdeaf783748a5f2fc6e8b1db46341b5b77a7fa420306b2a8b44d76feced4
|
data/changelog.md
CHANGED
@@ -94,22 +94,30 @@ module Raven
|
|
94
94
|
|
95
95
|
def format_headers_for_sentry(env_hash)
|
96
96
|
env_hash.each_with_object({}) do |(key, value), memo|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
97
|
+
begin
|
98
|
+
key = key.to_s # rack env can contain symbols
|
99
|
+
value = value.to_s
|
100
|
+
next unless key.upcase == key # Non-upper case stuff isn't either
|
101
|
+
|
102
|
+
# Rack adds in an incorrect HTTP_VERSION key, which causes downstream
|
103
|
+
# to think this is a Version header. Instead, this is mapped to
|
104
|
+
# env['SERVER_PROTOCOL']. But we don't want to ignore a valid header
|
105
|
+
# if the request has legitimately sent a Version header themselves.
|
106
|
+
# See: https://github.com/rack/rack/blob/028438f/lib/rack/handler/cgi.rb#L29
|
107
|
+
next if key == 'HTTP_VERSION' && value == env_hash['SERVER_PROTOCOL']
|
108
|
+
|
109
|
+
next unless key.start_with?('HTTP_') || %w(CONTENT_TYPE CONTENT_LENGTH).include?(key)
|
110
|
+
# Rack stores headers as HTTP_WHAT_EVER, we need What-Ever
|
111
|
+
key = key.gsub("HTTP_", "")
|
112
|
+
key = key.split('_').map(&:capitalize).join('-')
|
113
|
+
memo[key] = value
|
114
|
+
rescue StandardError => e
|
115
|
+
# Rails adds objects to the Rack env that can sometimes raise exceptions
|
116
|
+
# when `to_s` is called.
|
117
|
+
# See: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/remote_ip.rb#L134
|
118
|
+
Raven.logger.warn("Error raised while formatting headers: #{e.message}")
|
119
|
+
next
|
120
|
+
end
|
113
121
|
end
|
114
122
|
end
|
115
123
|
|
@@ -17,6 +17,7 @@ module Raven
|
|
17
17
|
def capture_and_reraise_with_sentry(job, block)
|
18
18
|
block.call
|
19
19
|
rescue Exception => exception # rubocop:disable Lint/RescueException
|
20
|
+
return if rescue_with_handler(exception)
|
20
21
|
return if already_supported_by_specific_integration?(job)
|
21
22
|
Raven.capture_exception(exception, :extra => raven_context(job))
|
22
23
|
raise exception
|
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.6.
|
4
|
+
version: 2.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|