raygun-apm-sidekiq 1.1.1 → 1.1.2
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/raygun/apm/sidekiq/hook.rb +9 -0
- data/lib/raygun/apm/sidekiq/version.rb +1 -1
- data/lib/raygun/apm/sidekiq.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 983d18c44dad05861403a92a3bdea42df25f39e312cd4a441137a2cdee76c1f2
|
4
|
+
data.tar.gz: 8f706e3487836cd6a8953f5c6c8fa436fafba79ff9297ede0af20d85db9c6b95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e5822a24b86b23059fceb1c8053f47b218f35cef606cf748b6eb747a98ad55f6c684292912bd72e51e9165d5ae6334637e94f335d5dec860814d354edbb1140
|
7
|
+
data.tar.gz: f59cd1281bea3d057668cf710576438e5f8f17ac3621b646521534430bd81ba1d1d9d85a84ca87886a5a347f73772b5c4eb53d9b62b2fe9ce48831a023c0e12a
|
@@ -31,6 +31,7 @@ module Raygun
|
|
31
31
|
super
|
32
32
|
fake_http_in_handler(@tracer, @worker_started, job_hash, queue, nil) if @tracer
|
33
33
|
rescue => e
|
34
|
+
crash_report_exception(e)
|
34
35
|
fake_http_in_handler(@tracer, @worker_started, job_hash, queue, e) if @tracer
|
35
36
|
exception = e
|
36
37
|
end
|
@@ -72,6 +73,7 @@ module Raygun
|
|
72
73
|
# Let the GC clean up the sink thread through the finalizer below
|
73
74
|
@tracer = nil
|
74
75
|
Raygun::Apm::Tracer.instance = nil
|
76
|
+
crash_report_exception(exception)
|
75
77
|
raise(exception) unless (Raygun::Apm::FatalError === exception)
|
76
78
|
end
|
77
79
|
|
@@ -133,6 +135,13 @@ module Raygun
|
|
133
135
|
def Ruby_APM_profiler_trace
|
134
136
|
yield
|
135
137
|
end
|
138
|
+
|
139
|
+
def crash_report_exception(exception, env = {})
|
140
|
+
if Raygun::Apm::Sidekiq.raygun4ruby?
|
141
|
+
env.merge!(correlation_id: exception.instance_variable_get(:@__raygun_correlation_id))
|
142
|
+
Raygun.track_exception(exception, env)
|
143
|
+
end
|
144
|
+
end
|
136
145
|
end
|
137
146
|
end
|
138
147
|
end
|
data/lib/raygun/apm/sidekiq.rb
CHANGED
@@ -10,6 +10,13 @@ module Raygun
|
|
10
10
|
+Raygun::Apm::Sidekiq::Hook#Ruby_APM_profiler_trace
|
11
11
|
}
|
12
12
|
|
13
|
+
def self.raygun4ruby?(configured = true)
|
14
|
+
if configured
|
15
|
+
defined?(Raygun) && Raygun.respond_to?(:configured?) && Raygun.configured?
|
16
|
+
else
|
17
|
+
defined?(Raygun) && Raygun.respond_to?(:configured?)
|
18
|
+
end
|
19
|
+
end
|
13
20
|
end
|
14
21
|
end
|
15
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raygun-apm-sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raygun Limited
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: raygun-apm
|