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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abcfc3c95da52620245b317b38fad4671a3eed3663e783a7e1b5282031d3768b
4
- data.tar.gz: 40a0831540211856018a96249db4ba45b9c1a94e594bd7688d667b117930922a
3
+ metadata.gz: 95e0d6120faf33879735ee5fdf79c9f1c02811b1dc37302408597c6d2858d132
4
+ data.tar.gz: 676ffb5e73117d303c434f0af95cb14bac52cb1472701a3832db2d7f617d372c
5
5
  SHA512:
6
- metadata.gz: c60a72500a05d7d6010f8cb241cb691de9b97d80549c1709a22b0f9494398bb85baf50682029102cc933b91f9007f20cda57a09233a9f2d9e80ddc1fd9f780e7
7
- data.tar.gz: 58340ca4dc992874b4b70ca74a2951f1d07efc72dbc387911140e3dd25c9eb2536a5b23ebbfe8ae6d3c4eb5d0a82a9461f5a63d6c556f15d7e114ddb1d504303
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)
@@ -1,7 +1,7 @@
1
1
  module Raygun
2
2
  module Apm
3
3
  module Sidekiq
4
- VERSION = "1.0.8"
4
+ VERSION = "1.0.9"
5
5
  end
6
6
  end
7
7
  end
@@ -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.7"
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.8
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-02-29 00:00:00.000000000 Z
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.7
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.7
27
+ version: 1.0.15
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: bundler
30
30
  requirement: !ruby/object:Gem::Requirement