rollbar 3.4.2 → 3.5.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 272903aca80c9b75c3569e73a7f03d26d9178c29d7b0bd0cb8a9f0b1a5ca10b8
|
4
|
+
data.tar.gz: e3a8e2311450fa42a86028b85e8cc772fe3cd5650b893d39fc775c79d629d354
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe2e14f701d38d233ee783f2e76a46429b4400140eb23a9659cb410b155aa610a970bebebad5b03d86e1e064563da5edfb2b3d4f9d4e15ce41c0ed388fc859b3
|
7
|
+
data.tar.gz: 3561ee290a64de01b22af538268d7898d9570dee746a4dde8048979d036995facdcc1bd8f8205a20916c2545352170ae24f8c9e1286e73f2757859c6b228ab83
|
@@ -18,10 +18,12 @@ module Rollbar
|
|
18
18
|
:custom_data_method,
|
19
19
|
:default_logger,
|
20
20
|
:delayed_job_enabled,
|
21
|
+
:disable_action_mailer_monkey_patch,
|
21
22
|
:disable_core_monkey_patch,
|
22
23
|
:disable_monkey_patch,
|
23
24
|
:disable_rack_monkey_patch,
|
24
25
|
:dj_threshold,
|
26
|
+
:dj_use_scoped_block,
|
25
27
|
:enable_error_context,
|
26
28
|
:enabled,
|
27
29
|
:endpoint,
|
@@ -98,10 +100,12 @@ module Rollbar
|
|
98
100
|
@logger_level = :info
|
99
101
|
@delayed_job_enabled = true
|
100
102
|
@disable_monkey_patch = false
|
103
|
+
@disable_action_mailer_monkey_patch = false
|
101
104
|
@disable_core_monkey_patch = false
|
102
105
|
@disable_rack_monkey_patch = false
|
103
106
|
@enable_error_context = true
|
104
107
|
@dj_threshold = 0
|
108
|
+
@dj_use_scoped_block = false
|
105
109
|
@async_skip_report_handler = nil
|
106
110
|
@enabled = nil # set to true when configure is called
|
107
111
|
@endpoint = DEFAULT_ENDPOINT
|
data/lib/rollbar/json.rb
CHANGED
@@ -7,7 +7,7 @@ module Rollbar
|
|
7
7
|
def render_exception_with_rollbar(env, exception, wrapper = nil)
|
8
8
|
key = 'action_dispatch.show_detailed_exceptions'
|
9
9
|
|
10
|
-
if exception.is_a?(ActionController::RoutingError) && env[key]
|
10
|
+
if exception.is_a?(ActionController::RoutingError) && env.params[key.to_s]
|
11
11
|
scope = extract_scope_from(env)
|
12
12
|
|
13
13
|
Rollbar.scoped(scope) do
|
@@ -1,35 +1,54 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
def self.included(base)
|
5
|
-
base.send :rescue_from, Exception do |exception|
|
6
|
-
args = if self.class.respond_to?(:log_arguments?) && !self.class.log_arguments?
|
7
|
-
arguments.map(&Rollbar::Scrubbers.method(:scrub_value))
|
8
|
-
else
|
9
|
-
arguments
|
10
|
-
end
|
1
|
+
Rollbar.plugins.define('active_job') do
|
2
|
+
dependency { !configuration.disable_monkey_patch }
|
3
|
+
dependency { !configuration.disable_action_mailer_monkey_patch }
|
11
4
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
5
|
+
execute do
|
6
|
+
module Rollbar
|
7
|
+
# Report any uncaught errors in a job to Rollbar and reraise
|
8
|
+
module ActiveJob
|
9
|
+
def self.included(base)
|
10
|
+
base.send :rescue_from, Exception do |exception|
|
11
|
+
job_data = {
|
12
|
+
:job => self.class.name,
|
13
|
+
:use_exception_level_filters => true
|
14
|
+
}
|
15
|
+
|
16
|
+
# When included in ActionMailer, the handler is called twice.
|
17
|
+
# This detects the execution that has the expected state.
|
18
|
+
if defined?(ActionMailer::Base) && self.class.ancestors.include?(ActionMailer::Base)
|
19
|
+
job_data[:action] = action_name
|
20
|
+
job_data[:params] = @params
|
21
|
+
|
22
|
+
Rollbar.error(exception, job_data)
|
23
|
+
|
24
|
+
# This detects other supported integrations.
|
25
|
+
elsif defined?(arguments)
|
26
|
+
job_data[:arguments] = \
|
27
|
+
if self.class.respond_to?(:log_arguments?) && !self.class.log_arguments?
|
28
|
+
arguments.map(&Rollbar::Scrubbers.method(:scrub_value))
|
29
|
+
else
|
30
|
+
arguments
|
31
|
+
end
|
32
|
+
job_data[:job_id] = job_id if defined?(job_id)
|
33
|
+
|
34
|
+
Rollbar.error(exception, job_data)
|
35
|
+
end
|
36
|
+
|
37
|
+
raise exception
|
38
|
+
end
|
39
|
+
end
|
18
40
|
end
|
19
41
|
end
|
20
|
-
end
|
21
|
-
end
|
22
42
|
|
23
|
-
if defined?(ActiveSupport) && ActiveSupport.respond_to?(:on_load)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
ActionMailer::MailDeliveryJob.send(:include, Rollbar::ActiveJob)
|
43
|
+
if defined?(ActiveSupport) && ActiveSupport.respond_to?(:on_load)
|
44
|
+
ActiveSupport.on_load(:action_mailer) do
|
45
|
+
if defined?(ActionMailer::MailDeliveryJob) # Rails >= 6.0
|
46
|
+
ActionMailer::Base.send(:include, Rollbar::ActiveJob)
|
47
|
+
elsif defined?(ActionMailer::DeliveryJob) # Rails < 6.0
|
48
|
+
ActionMailer::DeliveryJob.send(:include,
|
49
|
+
Rollbar::ActiveJob)
|
50
|
+
end
|
51
|
+
end
|
33
52
|
end
|
34
53
|
end
|
35
54
|
end
|
@@ -48,7 +48,12 @@ module Rollbar
|
|
48
48
|
def self.invoke_job_callback
|
49
49
|
proc do |job, *args, &block|
|
50
50
|
begin
|
51
|
-
|
51
|
+
if Rollbar.configuration.dj_use_scoped_block
|
52
|
+
data = Rollbar::Delayed.build_job_data(job)
|
53
|
+
Rollbar.scoped(:request => data) { block.call(job, *args) }
|
54
|
+
else
|
55
|
+
block.call(job, *args)
|
56
|
+
end
|
52
57
|
rescue StandardError => e
|
53
58
|
report(e, job)
|
54
59
|
|
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: 3.
|
4
|
+
version: 3.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rollbar, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Track and debug errors in your Ruby applications with ease using Rollbar.
|
14
14
|
With this gem, you can easily monitor and report on exceptions and other errors
|