raygun-apm-sidekiq 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec88f19fcc51782f3063a5d4b4ebd8cc227e47679efcf227758b040d00e8a5f9
4
- data.tar.gz: 3357550d29613e01b4c9b6c60df535c1b2ae7d59361d71416937c56c9287d72e
3
+ metadata.gz: 983d18c44dad05861403a92a3bdea42df25f39e312cd4a441137a2cdee76c1f2
4
+ data.tar.gz: 8f706e3487836cd6a8953f5c6c8fa436fafba79ff9297ede0af20d85db9c6b95
5
5
  SHA512:
6
- metadata.gz: ea114b825118fb67482929c2220b45e6ced94513a3ae77c43694679e49652dfb37e4ea437707e2fba2bad0e40b7ae9c7592b85b6740ed5e0112336b34f3b7b06
7
- data.tar.gz: f7266500e839e27d61abb11e05c210131155ed0b345625474ac094f98d44061aed8631214d06e6a99c7000e0cee715e8ece657cdb1825cb54a3ce2d55c5b6e17
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
@@ -1,7 +1,7 @@
1
1
  module Raygun
2
2
  module Apm
3
3
  module Sidekiq
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.2"
5
5
  end
6
6
  end
7
7
  end
@@ -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.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-05-23 00:00:00.000000000 Z
11
+ date: 2021-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: raygun-apm