raygun-apm-sidekiq 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/raygun/apm/sidekiq/middleware.rb +9 -4
- data/lib/raygun/apm/sidekiq/version.rb +1 -1
- data/raygun-apm-sidekiq.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95e0d6120faf33879735ee5fdf79c9f1c02811b1dc37302408597c6d2858d132
|
4
|
+
data.tar.gz: 676ffb5e73117d303c434f0af95cb14bac52cb1472701a3832db2d7f617d372c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62d74bf1bb52950794ceb9d06501fd7567903c1e8f112ae371c53a712d19b7fad51a9bce7973b32109c912a87a76734a87914a762ad8bdcab88cd77fa5b91557
|
7
|
+
data.tar.gz: 48bf45bbb2225efb071959173cb8344b08acfae4f0d3d1474ca0cdc7770a8089d8b791859b18f6f009aaa4182b26205f2b968bd8a278e35ae444484d15c4383f
|
@@ -3,6 +3,10 @@ module Raygun
|
|
3
3
|
module Sidekiq
|
4
4
|
class Middleware
|
5
5
|
def initialize
|
6
|
+
@tracer_initialized = nil
|
7
|
+
end
|
8
|
+
|
9
|
+
def initialize_tracer
|
6
10
|
@tracer = Raygun::Apm::Tracer.new
|
7
11
|
@tracer.udp_sink!
|
8
12
|
@tracer.process_started
|
@@ -11,13 +15,16 @@ module Raygun
|
|
11
15
|
@sql_subscriber = ActiveSupport::Notifications.subscribe('sql.active_record') do |*args|
|
12
16
|
sql_handler(args)
|
13
17
|
end
|
14
|
-
|
18
|
+
|
19
|
+
GC.stress = true if ENV['RAYGUN_STRESS_GC']
|
20
|
+
|
15
21
|
# If any fatal errors on init, shutdown the tracer
|
16
22
|
rescue Raygun::Apm::FatalError => e
|
17
23
|
raygun_shutdown_handler(e)
|
18
24
|
end
|
19
|
-
|
25
|
+
|
20
26
|
def call(worker_instance, msg, queue)
|
27
|
+
@tracer_initialized ||= initialize_tracer
|
21
28
|
# Can be nil if we had a fatal error
|
22
29
|
if @tracer
|
23
30
|
started = @tracer.now
|
@@ -44,8 +51,6 @@ module Raygun
|
|
44
51
|
# Kill extended event subcriptions
|
45
52
|
ActiveSupport::Notifications.unsubscribe(@sql_subscriber)
|
46
53
|
warn "[Raygun APM] notification hooks unsubscribed"
|
47
|
-
# Shutdown the tracepoints if enabled to reduce any overhead and stall emission
|
48
|
-
@tracer.stop_tracepoints
|
49
54
|
# Let the GC clean up the sink thread through the finalizer below
|
50
55
|
@tracer = nil
|
51
56
|
Thread.current.thread_variable_set(:_raygun_apm_tracer, nil)
|
data/raygun-apm-sidekiq.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_dependency "raygun-apm", "~> 1.0.
|
23
|
+
spec.add_dependency "raygun-apm", "~> 1.0.15"
|
24
24
|
spec.add_development_dependency "bundler"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
26
|
spec.add_development_dependency "minitest", "~> 5.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raygun-apm-sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raygun
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-03-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: raygun-apm
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.0.
|
20
|
+
version: 1.0.15
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.0.
|
27
|
+
version: 1.0.15
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: bundler
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|