airbrake-ruby 6.0.2-java → 6.1.2-java
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/lib/airbrake-ruby/config/processor.rb +6 -0
- data/lib/airbrake-ruby/filters/git_last_checkout_filter.rb +1 -1
- data/lib/airbrake-ruby/filters/git_repository_filter.rb +7 -1
- data/lib/airbrake-ruby/nested_exception.rb +22 -1
- data/lib/airbrake-ruby/notice.rb +5 -3
- data/lib/airbrake-ruby/sync_sender.rb +2 -2
- data/lib/airbrake-ruby/version.rb +1 -1
- metadata +4 -122
- data/spec/airbrake_spec.rb +0 -522
- data/spec/async_sender_spec.rb +0 -65
- data/spec/backtrace_spec.rb +0 -430
- data/spec/benchmark_spec.rb +0 -35
- data/spec/code_hunk_spec.rb +0 -124
- data/spec/config/processor_spec.rb +0 -151
- data/spec/config/validator_spec.rb +0 -204
- data/spec/config_spec.rb +0 -188
- data/spec/context_spec.rb +0 -54
- data/spec/deploy_notifier_spec.rb +0 -50
- data/spec/file_cache_spec.rb +0 -35
- data/spec/filter_chain_spec.rb +0 -124
- data/spec/filters/context_filter_spec.rb +0 -32
- data/spec/filters/dependency_filter_spec.rb +0 -14
- data/spec/filters/exception_attributes_filter_spec.rb +0 -52
- data/spec/filters/gem_root_filter_spec.rb +0 -44
- data/spec/filters/git_last_checkout_filter_spec.rb +0 -61
- data/spec/filters/git_repository_filter.rb +0 -61
- data/spec/filters/git_revision_filter_spec.rb +0 -126
- data/spec/filters/keys_allowlist_spec.rb +0 -204
- data/spec/filters/keys_blocklist_spec.rb +0 -242
- data/spec/filters/root_directory_filter_spec.rb +0 -39
- data/spec/filters/sql_filter_spec.rb +0 -274
- data/spec/filters/system_exit_filter_spec.rb +0 -16
- data/spec/filters/thread_filter_spec.rb +0 -281
- data/spec/fixtures/notroot.txt +0 -7
- data/spec/fixtures/project_root/code.rb +0 -221
- data/spec/fixtures/project_root/empty_file.rb +0 -0
- data/spec/fixtures/project_root/long_line.txt +0 -1
- data/spec/fixtures/project_root/short_file.rb +0 -3
- data/spec/fixtures/project_root/vendor/bundle/ignored_file.rb +0 -5
- data/spec/helpers.rb +0 -9
- data/spec/ignorable_spec.rb +0 -14
- data/spec/inspectable_spec.rb +0 -45
- data/spec/loggable_spec.rb +0 -17
- data/spec/monotonic_time_spec.rb +0 -25
- data/spec/nested_exception_spec.rb +0 -73
- data/spec/notice_notifier/options_spec.rb +0 -269
- data/spec/notice_notifier_spec.rb +0 -361
- data/spec/notice_spec.rb +0 -300
- data/spec/performance_breakdown_spec.rb +0 -11
- data/spec/performance_notifier_spec.rb +0 -645
- data/spec/promise_spec.rb +0 -203
- data/spec/query_spec.rb +0 -11
- data/spec/queue_spec.rb +0 -18
- data/spec/remote_settings/callback_spec.rb +0 -162
- data/spec/remote_settings/settings_data_spec.rb +0 -348
- data/spec/remote_settings_spec.rb +0 -201
- data/spec/request_spec.rb +0 -9
- data/spec/response_spec.rb +0 -110
- data/spec/spec_helper.rb +0 -100
- data/spec/stashable_spec.rb +0 -23
- data/spec/stat_spec.rb +0 -39
- data/spec/sync_sender_spec.rb +0 -168
- data/spec/tdigest_spec.rb +0 -235
- data/spec/thread_pool_spec.rb +0 -196
- data/spec/time_truncate_spec.rb +0 -30
- data/spec/timed_trace_spec.rb +0 -127
- data/spec/truncator_spec.rb +0 -267
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f885330e360e61f8b2779c9d03b98b2794ef6e9e2fa9453bbd15630513780c4
|
4
|
+
data.tar.gz: b054ea5189464b1ebf822812cb7192893fbf84ef085b57fdfca9ead3d3361c6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a577980c05f36c8e1e90fdf9181e9cafd35dd6b66cca387f3c3250aac8eb7d3d0838d241ae19b93c383f10e00b2e862ab0154754b382e9c7a3d664bc40620d2c
|
7
|
+
data.tar.gz: ee6edd6c1a279ba33ca4e898198aff4147e07be36feb9aa165fd076668499a08cc41d8fc5158dff09ee9fc7d5732f0e5c87b4e3bc1ca57d39485651d0431082a
|
@@ -43,8 +43,14 @@ module Airbrake
|
|
43
43
|
def process_remote_configuration
|
44
44
|
return unless @config.remote_config
|
45
45
|
return unless @project_id
|
46
|
+
|
47
|
+
# Never poll remote configuration in the test environment.
|
46
48
|
return if @config.environment == 'test'
|
47
49
|
|
50
|
+
# If the current environment is ignored, don't try to poll remote
|
51
|
+
# configuration.
|
52
|
+
return if @config.ignore_environments.include?(@config.environment)
|
53
|
+
|
48
54
|
RemoteSettings.poll(@project_id, @config.remote_config_host) do |data|
|
49
55
|
@poll_callback.call(data)
|
50
56
|
end
|
@@ -49,7 +49,13 @@ module Airbrake
|
|
49
49
|
def detect_git_version
|
50
50
|
return unless which('git')
|
51
51
|
|
52
|
-
|
52
|
+
begin
|
53
|
+
Gem::Version.new(`git --version`.split[2])
|
54
|
+
rescue Errno::EAGAIN
|
55
|
+
# Bugfix for the case when the system cannot allocate memory for
|
56
|
+
# a fork() call: https://github.com/airbrake/airbrake-ruby/issues/680
|
57
|
+
nil
|
58
|
+
end
|
53
59
|
end
|
54
60
|
|
55
61
|
# Cross-platform way to tell if an executable is accessible.
|
@@ -9,6 +9,18 @@ module Airbrake
|
|
9
9
|
# can unwrap. Exceptions that have a longer cause chain will be ignored
|
10
10
|
MAX_NESTED_EXCEPTIONS = 3
|
11
11
|
|
12
|
+
# On Ruby 3.1+, the error highlighting gem can produce messages that can
|
13
|
+
# span multiple lines. We don't display multiline error messages in the
|
14
|
+
# title of the notice in the Airbrake dashboard. Therefore, we want to strip
|
15
|
+
# out the higlighting part so that the errors look consistent. The full
|
16
|
+
# message with the exception will be attached to the notice body.
|
17
|
+
#
|
18
|
+
# @return [String]
|
19
|
+
RUBY_31_ERROR_HIGHLIGHTING_DIVIDER = "\n\n".freeze
|
20
|
+
|
21
|
+
# @return [Hash] the options for +String#encode+
|
22
|
+
ENCODING_OPTIONS = { invalid: :replace, undef: :replace }.freeze
|
23
|
+
|
12
24
|
def initialize(exception)
|
13
25
|
@exception = exception
|
14
26
|
end
|
@@ -16,7 +28,7 @@ module Airbrake
|
|
16
28
|
def as_json
|
17
29
|
unwind_exceptions.map do |exception|
|
18
30
|
{ type: exception.class.name,
|
19
|
-
message: exception
|
31
|
+
message: message(exception),
|
20
32
|
backtrace: Backtrace.parse(exception) }
|
21
33
|
end
|
22
34
|
end
|
@@ -34,5 +46,14 @@ module Airbrake
|
|
34
46
|
|
35
47
|
exception_list
|
36
48
|
end
|
49
|
+
|
50
|
+
def message(exception)
|
51
|
+
return unless (msg = exception.message)
|
52
|
+
|
53
|
+
msg
|
54
|
+
.encode(Encoding::UTF_8, **ENCODING_OPTIONS)
|
55
|
+
.split(RUBY_31_ERROR_HIGHLIGHTING_DIVIDER)
|
56
|
+
.first
|
57
|
+
end
|
37
58
|
end
|
38
59
|
end
|
data/lib/airbrake-ruby/notice.rb
CHANGED
@@ -49,16 +49,17 @@ module Airbrake
|
|
49
49
|
# @api private
|
50
50
|
def initialize(exception, params = {})
|
51
51
|
@config = Airbrake::Config.instance
|
52
|
+
@truncator = Airbrake::Truncator.new(PAYLOAD_MAX_SIZE)
|
53
|
+
|
52
54
|
@payload = {
|
53
55
|
errors: NestedException.new(exception).as_json,
|
54
|
-
context: context,
|
56
|
+
context: context(exception),
|
55
57
|
environment: {
|
56
58
|
program_name: $PROGRAM_NAME,
|
57
59
|
},
|
58
60
|
session: {},
|
59
61
|
params: params,
|
60
62
|
}
|
61
|
-
@truncator = Airbrake::Truncator.new(PAYLOAD_MAX_SIZE)
|
62
63
|
|
63
64
|
stash[:exception] = exception
|
64
65
|
end
|
@@ -118,7 +119,7 @@ module Airbrake
|
|
118
119
|
|
119
120
|
private
|
120
121
|
|
121
|
-
def context
|
122
|
+
def context(exception)
|
122
123
|
{
|
123
124
|
version: @config.app_version,
|
124
125
|
versions: @config.versions,
|
@@ -132,6 +133,7 @@ module Airbrake
|
|
132
133
|
hostname: HOSTNAME,
|
133
134
|
|
134
135
|
severity: DEFAULT_SEVERITY,
|
136
|
+
error_message: @truncator.truncate(exception.message),
|
135
137
|
}.merge(CONTEXT).delete_if { |_key, val| val.nil? || val.empty? }
|
136
138
|
end
|
137
139
|
|
@@ -80,8 +80,8 @@ module Airbrake
|
|
80
80
|
req['Authorization'] = "Bearer #{@config.project_key}"
|
81
81
|
req['Content-Type'] = CONTENT_TYPE
|
82
82
|
req['User-Agent'] =
|
83
|
-
"#{Airbrake::NOTIFIER_INFO[:name]}/#{Airbrake::AIRBRAKE_RUBY_VERSION}" \
|
84
|
-
"
|
83
|
+
"#{Airbrake::NOTIFIER_INFO[:name]}/#{Airbrake::AIRBRAKE_RUBY_VERSION} " \
|
84
|
+
"Ruby/#{RUBY_VERSION}"
|
85
85
|
|
86
86
|
req
|
87
87
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.1.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Airbrake Technologies, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01
|
11
|
+
date: 2022-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbtree-jruby
|
@@ -93,65 +93,6 @@ files:
|
|
93
93
|
- lib/airbrake-ruby/timed_trace.rb
|
94
94
|
- lib/airbrake-ruby/truncator.rb
|
95
95
|
- lib/airbrake-ruby/version.rb
|
96
|
-
- spec/airbrake_spec.rb
|
97
|
-
- spec/async_sender_spec.rb
|
98
|
-
- spec/backtrace_spec.rb
|
99
|
-
- spec/benchmark_spec.rb
|
100
|
-
- spec/code_hunk_spec.rb
|
101
|
-
- spec/config/processor_spec.rb
|
102
|
-
- spec/config/validator_spec.rb
|
103
|
-
- spec/config_spec.rb
|
104
|
-
- spec/context_spec.rb
|
105
|
-
- spec/deploy_notifier_spec.rb
|
106
|
-
- spec/file_cache_spec.rb
|
107
|
-
- spec/filter_chain_spec.rb
|
108
|
-
- spec/filters/context_filter_spec.rb
|
109
|
-
- spec/filters/dependency_filter_spec.rb
|
110
|
-
- spec/filters/exception_attributes_filter_spec.rb
|
111
|
-
- spec/filters/gem_root_filter_spec.rb
|
112
|
-
- spec/filters/git_last_checkout_filter_spec.rb
|
113
|
-
- spec/filters/git_repository_filter.rb
|
114
|
-
- spec/filters/git_revision_filter_spec.rb
|
115
|
-
- spec/filters/keys_allowlist_spec.rb
|
116
|
-
- spec/filters/keys_blocklist_spec.rb
|
117
|
-
- spec/filters/root_directory_filter_spec.rb
|
118
|
-
- spec/filters/sql_filter_spec.rb
|
119
|
-
- spec/filters/system_exit_filter_spec.rb
|
120
|
-
- spec/filters/thread_filter_spec.rb
|
121
|
-
- spec/fixtures/notroot.txt
|
122
|
-
- spec/fixtures/project_root/code.rb
|
123
|
-
- spec/fixtures/project_root/empty_file.rb
|
124
|
-
- spec/fixtures/project_root/long_line.txt
|
125
|
-
- spec/fixtures/project_root/short_file.rb
|
126
|
-
- spec/fixtures/project_root/vendor/bundle/ignored_file.rb
|
127
|
-
- spec/helpers.rb
|
128
|
-
- spec/ignorable_spec.rb
|
129
|
-
- spec/inspectable_spec.rb
|
130
|
-
- spec/loggable_spec.rb
|
131
|
-
- spec/monotonic_time_spec.rb
|
132
|
-
- spec/nested_exception_spec.rb
|
133
|
-
- spec/notice_notifier/options_spec.rb
|
134
|
-
- spec/notice_notifier_spec.rb
|
135
|
-
- spec/notice_spec.rb
|
136
|
-
- spec/performance_breakdown_spec.rb
|
137
|
-
- spec/performance_notifier_spec.rb
|
138
|
-
- spec/promise_spec.rb
|
139
|
-
- spec/query_spec.rb
|
140
|
-
- spec/queue_spec.rb
|
141
|
-
- spec/remote_settings/callback_spec.rb
|
142
|
-
- spec/remote_settings/settings_data_spec.rb
|
143
|
-
- spec/remote_settings_spec.rb
|
144
|
-
- spec/request_spec.rb
|
145
|
-
- spec/response_spec.rb
|
146
|
-
- spec/spec_helper.rb
|
147
|
-
- spec/stashable_spec.rb
|
148
|
-
- spec/stat_spec.rb
|
149
|
-
- spec/sync_sender_spec.rb
|
150
|
-
- spec/tdigest_spec.rb
|
151
|
-
- spec/thread_pool_spec.rb
|
152
|
-
- spec/time_truncate_spec.rb
|
153
|
-
- spec/timed_trace_spec.rb
|
154
|
-
- spec/truncator_spec.rb
|
155
96
|
homepage: https://airbrake.io
|
156
97
|
licenses:
|
157
98
|
- MIT
|
@@ -172,67 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
113
|
- !ruby/object:Gem::Version
|
173
114
|
version: '0'
|
174
115
|
requirements: []
|
175
|
-
rubygems_version: 3.
|
116
|
+
rubygems_version: 3.3.3
|
176
117
|
signing_key:
|
177
118
|
specification_version: 4
|
178
119
|
summary: Ruby notifier for https://airbrake.io
|
179
|
-
test_files:
|
180
|
-
- spec/airbrake_spec.rb
|
181
|
-
- spec/async_sender_spec.rb
|
182
|
-
- spec/backtrace_spec.rb
|
183
|
-
- spec/benchmark_spec.rb
|
184
|
-
- spec/code_hunk_spec.rb
|
185
|
-
- spec/config/processor_spec.rb
|
186
|
-
- spec/config/validator_spec.rb
|
187
|
-
- spec/config_spec.rb
|
188
|
-
- spec/context_spec.rb
|
189
|
-
- spec/deploy_notifier_spec.rb
|
190
|
-
- spec/file_cache_spec.rb
|
191
|
-
- spec/filter_chain_spec.rb
|
192
|
-
- spec/filters/context_filter_spec.rb
|
193
|
-
- spec/filters/dependency_filter_spec.rb
|
194
|
-
- spec/filters/exception_attributes_filter_spec.rb
|
195
|
-
- spec/filters/gem_root_filter_spec.rb
|
196
|
-
- spec/filters/git_last_checkout_filter_spec.rb
|
197
|
-
- spec/filters/git_repository_filter.rb
|
198
|
-
- spec/filters/git_revision_filter_spec.rb
|
199
|
-
- spec/filters/keys_allowlist_spec.rb
|
200
|
-
- spec/filters/keys_blocklist_spec.rb
|
201
|
-
- spec/filters/root_directory_filter_spec.rb
|
202
|
-
- spec/filters/sql_filter_spec.rb
|
203
|
-
- spec/filters/system_exit_filter_spec.rb
|
204
|
-
- spec/filters/thread_filter_spec.rb
|
205
|
-
- spec/fixtures/notroot.txt
|
206
|
-
- spec/fixtures/project_root/code.rb
|
207
|
-
- spec/fixtures/project_root/empty_file.rb
|
208
|
-
- spec/fixtures/project_root/long_line.txt
|
209
|
-
- spec/fixtures/project_root/short_file.rb
|
210
|
-
- spec/fixtures/project_root/vendor/bundle/ignored_file.rb
|
211
|
-
- spec/helpers.rb
|
212
|
-
- spec/ignorable_spec.rb
|
213
|
-
- spec/inspectable_spec.rb
|
214
|
-
- spec/loggable_spec.rb
|
215
|
-
- spec/monotonic_time_spec.rb
|
216
|
-
- spec/nested_exception_spec.rb
|
217
|
-
- spec/notice_notifier/options_spec.rb
|
218
|
-
- spec/notice_notifier_spec.rb
|
219
|
-
- spec/notice_spec.rb
|
220
|
-
- spec/performance_breakdown_spec.rb
|
221
|
-
- spec/performance_notifier_spec.rb
|
222
|
-
- spec/promise_spec.rb
|
223
|
-
- spec/query_spec.rb
|
224
|
-
- spec/queue_spec.rb
|
225
|
-
- spec/remote_settings/callback_spec.rb
|
226
|
-
- spec/remote_settings/settings_data_spec.rb
|
227
|
-
- spec/remote_settings_spec.rb
|
228
|
-
- spec/request_spec.rb
|
229
|
-
- spec/response_spec.rb
|
230
|
-
- spec/spec_helper.rb
|
231
|
-
- spec/stashable_spec.rb
|
232
|
-
- spec/stat_spec.rb
|
233
|
-
- spec/sync_sender_spec.rb
|
234
|
-
- spec/tdigest_spec.rb
|
235
|
-
- spec/thread_pool_spec.rb
|
236
|
-
- spec/time_truncate_spec.rb
|
237
|
-
- spec/timed_trace_spec.rb
|
238
|
-
- spec/truncator_spec.rb
|
120
|
+
test_files: []
|