rollbar 2.19.3 → 2.19.4
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/Gemfile +12 -1
- data/gemfiles/rails30.gemfile +7 -0
- data/gemfiles/rails31.gemfile +7 -0
- data/gemfiles/rails32.gemfile +7 -0
- data/gemfiles/rails40.gemfile +7 -0
- data/gemfiles/rails41.gemfile +7 -0
- data/gemfiles/rails42.gemfile +7 -0
- data/gemfiles/rails50.gemfile +12 -1
- data/gemfiles/rails51.gemfile +12 -1
- data/gemfiles/rails52.gemfile +12 -1
- data/lib/rails/rollbar_runner.rb +1 -1
- data/lib/rollbar/item.rb +18 -6
- data/lib/rollbar/truncation.rb +2 -1
- data/lib/rollbar/truncation/strings_strategy.rb +1 -1
- data/lib/rollbar/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b47d0c414eae81fc5c56847fad8ebb187b898f53da2877393516a0fce6ba8234
|
4
|
+
data.tar.gz: 39e8555260a5c9f166459563d5b23e8c9f70c28fe155daa79e70b04633147024
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 217ebcd88c5e29c08b4003e9cd322cf158864e4e26b16a9b003791df9efb9ade1d23489f5ba586db6ae7f615de25a16209f9052a220e4688cd9abdab6d10e04c
|
7
|
+
data.tar.gz: f069f5e44990a8b28d42db5903f16fb785bf0d3296d24069d36879d33caecb2cc25b9f3e4f5b9c29b99b7bcbfcc0fd76a5223807d82a2e16d8394f8ac2ebe0c2
|
data/Gemfile
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby')
|
6
13
|
|
7
14
|
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
@@ -47,6 +54,11 @@ elsif RUBY_VERSION.start_with?('2')
|
|
47
54
|
gem 'sucker_punch', '~> 2.0' # rubocop:disable Bundler/DuplicatedGem
|
48
55
|
end
|
49
56
|
|
57
|
+
unless is_jruby
|
58
|
+
# JRuby doesn't support fork, which is required for this test helper.
|
59
|
+
gem 'rspec-command'
|
60
|
+
end
|
61
|
+
|
50
62
|
gem 'aws-sdk-sqs'
|
51
63
|
gem 'database_cleaner'
|
52
64
|
gem 'delayed_job', :require => false
|
@@ -54,7 +66,6 @@ gem 'generator_spec'
|
|
54
66
|
gem 'girl_friday', '>= 0.11.1'
|
55
67
|
gem 'redis'
|
56
68
|
gem 'resque', '< 2.0.0'
|
57
|
-
gem 'rspec-command'
|
58
69
|
gem 'rubocop', :require => false
|
59
70
|
gem 'sinatra'
|
60
71
|
gem 'webmock', :require => false
|
data/gemfiles/rails30.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
|
data/gemfiles/rails31.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
|
data/gemfiles/rails32.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'appraisal'
|
data/gemfiles/rails40.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'appraisal'
|
data/gemfiles/rails41.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'appraisal'
|
data/gemfiles/rails42.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
is_not_jruby = !is_jruby
|
7
14
|
|
data/gemfiles/rails50.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'appraisal'
|
@@ -53,10 +60,14 @@ gem 'database_cleaner'
|
|
53
60
|
gem 'delayed_job', :require => false
|
54
61
|
gem 'generator_spec'
|
55
62
|
gem 'girl_friday', '>= 0.11.1'
|
56
|
-
gem 'rspec-command'
|
57
63
|
gem 'redis'
|
58
64
|
gem 'resque'
|
59
65
|
|
66
|
+
unless is_jruby
|
67
|
+
# JRuby doesn't support fork, which is required for this test helper.
|
68
|
+
gem 'rspec-command'
|
69
|
+
end
|
70
|
+
|
60
71
|
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0')
|
61
72
|
gem 'mime-types', '< 3.0'
|
62
73
|
end
|
data/gemfiles/rails51.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'appraisal'
|
@@ -54,10 +61,14 @@ gem 'database_cleaner'
|
|
54
61
|
gem 'delayed_job', :require => false
|
55
62
|
gem 'generator_spec'
|
56
63
|
gem 'girl_friday', '>= 0.11.1'
|
57
|
-
gem 'rspec-command'
|
58
64
|
gem 'redis'
|
59
65
|
gem 'resque'
|
60
66
|
|
67
|
+
unless is_jruby
|
68
|
+
# JRuby doesn't support fork, which is required for this test helper.
|
69
|
+
gem 'rspec-command'
|
70
|
+
end
|
71
|
+
|
61
72
|
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0')
|
62
73
|
gem 'mime-types', '< 3.0'
|
63
74
|
end
|
data/gemfiles/rails52.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'appraisal'
|
@@ -47,11 +54,15 @@ gem 'codacy-coverage'
|
|
47
54
|
gem 'delayed_job', :require => false
|
48
55
|
gem 'generator_spec'
|
49
56
|
gem 'girl_friday', '>= 0.11.1'
|
50
|
-
gem 'rspec-command'
|
51
57
|
gem 'redis'
|
52
58
|
gem 'resque'
|
53
59
|
gem 'simplecov'
|
54
60
|
|
61
|
+
unless is_jruby
|
62
|
+
# JRuby doesn't support fork, which is required for this test helper.
|
63
|
+
gem 'rspec-command'
|
64
|
+
end
|
65
|
+
|
55
66
|
gem 'mime-types'
|
56
67
|
|
57
68
|
gem 'webmock', :require => false
|
data/lib/rails/rollbar_runner.rb
CHANGED
data/lib/rollbar/item.rb
CHANGED
@@ -106,25 +106,37 @@ module Rollbar
|
|
106
106
|
# Ensure all keys are strings since we can receive the payload inline or
|
107
107
|
# from an async handler job, which can be serialized.
|
108
108
|
stringified_payload = Util::Hash.deep_stringify_keys(payload)
|
109
|
-
|
109
|
+
attempts = []
|
110
|
+
result = Truncation.truncate(stringified_payload, attempts)
|
110
111
|
|
111
112
|
return result unless Truncation.truncate?(result)
|
112
113
|
|
113
|
-
handle_too_large_payload(stringified_payload, result)
|
114
|
+
handle_too_large_payload(stringified_payload, result, attempts)
|
114
115
|
|
115
116
|
nil
|
116
117
|
end
|
117
118
|
|
118
|
-
def handle_too_large_payload(stringified_payload, final_payload)
|
119
|
-
original_size = Rollbar::JSON.dump(stringified_payload).bytesize
|
120
|
-
final_size = final_payload.bytesize
|
119
|
+
def handle_too_large_payload(stringified_payload, final_payload, attempts)
|
121
120
|
uuid = stringified_payload['data']['uuid']
|
122
121
|
host = stringified_payload['data'].fetch('server', {})['host']
|
123
122
|
|
124
|
-
notifier.send_failsafe(
|
123
|
+
notifier.send_failsafe(
|
124
|
+
too_large_payload_string(stringified_payload, final_payload, attempts),
|
125
|
+
nil,
|
126
|
+
uuid,
|
127
|
+
host
|
128
|
+
)
|
125
129
|
logger.error("[Rollbar] Payload too large to be sent for UUID #{uuid}: #{Rollbar::JSON.dump(payload)}")
|
126
130
|
end
|
127
131
|
|
132
|
+
def too_large_payload_string(stringified_payload, final_payload, attempts)
|
133
|
+
original_size = Rollbar::JSON.dump(stringified_payload).bytesize
|
134
|
+
final_size = final_payload.bytesize
|
135
|
+
|
136
|
+
'Could not send payload due to it being too large after truncating attempts. ' \
|
137
|
+
"Original size: #{original_size} Attempts: #{attempts.join(', ')} Final size: #{final_size}"
|
138
|
+
end
|
139
|
+
|
128
140
|
def ignored?
|
129
141
|
data = payload['data']
|
130
142
|
|
data/lib/rollbar/truncation.rb
CHANGED
@@ -15,11 +15,12 @@ module Rollbar
|
|
15
15
|
StringsStrategy,
|
16
16
|
MinBodyStrategy].freeze
|
17
17
|
|
18
|
-
def self.truncate(payload)
|
18
|
+
def self.truncate(payload, attempts = [])
|
19
19
|
result = nil
|
20
20
|
|
21
21
|
STRATEGIES.each do |strategy|
|
22
22
|
result = strategy.call(payload)
|
23
|
+
attempts << result.bytesize
|
23
24
|
break unless truncate?(result)
|
24
25
|
end
|
25
26
|
|
data/lib/rollbar/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rollbar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.19.
|
4
|
+
version: 2.19.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rollbar, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -169,7 +169,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0'
|
171
171
|
requirements: []
|
172
|
-
|
172
|
+
rubyforge_project:
|
173
|
+
rubygems_version: 2.7.7
|
173
174
|
signing_key:
|
174
175
|
specification_version: 4
|
175
176
|
summary: Reports exceptions to Rollbar
|