raygun-apm-sidekiq 1.1.2 → 1.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8eb60a5d5debbf6e3bdde1ca25277c32a3c4c73338534b286f8454ef1710123e
|
4
|
+
data.tar.gz: 7d5332c206419c65d64350b4c96ad9b036ee700e3545135013c1e25eb4125252
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63827daad6dfae46726984fcea163ab7fbc93b69e26fe4dad55e33983dbcc9964de5f38a98a4f1048263a538f8bf8926af40c77c9318e8e61420523f96e8b2cd
|
7
|
+
data.tar.gz: 7bf386f072d834afb4fe51c112b95f601e435133b607f192b5b8cfeb909698e4cb42077fc4baf53badbf1eed2054eb8e6d7a9a042b11fa5648bbb4b35fa8e337
|
@@ -4,22 +4,18 @@ require 'sidekiq/processor'
|
|
4
4
|
module Raygun
|
5
5
|
module Apm
|
6
6
|
module Sidekiq
|
7
|
-
|
7
|
+
class Middleware
|
8
8
|
def self.finalize(tracer)
|
9
9
|
proc {tracer.process_ended}
|
10
10
|
end
|
11
11
|
|
12
12
|
def initialize(*args)
|
13
|
-
|
14
|
-
@mutex = Mutex.new
|
15
|
-
@mutex.synchronize do
|
13
|
+
Raygun::Apm::Tracer.synchronize do
|
16
14
|
@tracer = Raygun::Apm::Tracer.instance || init_tracer
|
17
15
|
end
|
18
16
|
end
|
19
17
|
|
20
|
-
def
|
21
|
-
job_hash = ::Sidekiq.load_json(work.job)
|
22
|
-
queue = work.queue_name
|
18
|
+
def call(worker, job_hash, queue)
|
23
19
|
# Can be nil if we had a fatal error
|
24
20
|
if @tracer
|
25
21
|
@worker_started = @tracer.now
|
@@ -28,7 +24,7 @@ module Raygun
|
|
28
24
|
exception = nil
|
29
25
|
Ruby_APM_profiler_trace do
|
30
26
|
begin
|
31
|
-
|
27
|
+
yield
|
32
28
|
fake_http_in_handler(@tracer, @worker_started, job_hash, queue, nil) if @tracer
|
33
29
|
rescue => e
|
34
30
|
crash_report_exception(e)
|
@@ -51,7 +47,7 @@ module Raygun
|
|
51
47
|
def init_tracer
|
52
48
|
tracer = Raygun::Apm::Tracer.new
|
53
49
|
tracer.udp_sink!
|
54
|
-
ObjectSpace.define_finalizer(self,
|
50
|
+
ObjectSpace.define_finalizer(self, Middleware.finalize(tracer))
|
55
51
|
|
56
52
|
ActiveSupport::Notifications.unsubscribe(@sql_subscriber) if @sql_subscriber
|
57
53
|
@sql_subscriber = ActiveSupport::Notifications.subscribe('sql.active_record') do |*args|
|
@@ -147,4 +143,8 @@ module Raygun
|
|
147
143
|
end
|
148
144
|
end
|
149
145
|
|
150
|
-
Sidekiq
|
146
|
+
Sidekiq.configure_server do |config|
|
147
|
+
config.server_middleware do |chain|
|
148
|
+
chain.add Raygun::Apm::Sidekiq::Middleware
|
149
|
+
end
|
150
|
+
end
|
@@ -4,7 +4,7 @@ module Raygun
|
|
4
4
|
class Railtie < ::Rails::Railtie
|
5
5
|
initializer "raygun.apm.sidekiq" do |app|
|
6
6
|
require "raygun/apm"
|
7
|
-
require "raygun/apm/sidekiq/
|
7
|
+
require "raygun/apm/sidekiq/middleware"
|
8
8
|
Raygun::Apm::Blacklist.extend_with Raygun::Apm::Sidekiq::BLACKLIST
|
9
9
|
# Explictly enable instrumenting HTTP until a good control API is figured out
|
10
10
|
require "raygun/apm/hooks/net_http"
|
data/lib/raygun/apm/sidekiq.rb
CHANGED
data/raygun-apm-sidekiq.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "raygun-apm"
|
21
|
+
spec.add_dependency "raygun-apm", "~> 1.1.10"
|
22
22
|
spec.add_development_dependency "bundler"
|
23
23
|
spec.add_development_dependency "rake", "~> 10.0"
|
24
24
|
spec.add_development_dependency "minitest", "~> 5.0"
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raygun Limited
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: raygun-apm
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.1.10
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.1.10
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,7 +79,7 @@ files:
|
|
79
79
|
- bin/console
|
80
80
|
- bin/setup
|
81
81
|
- lib/raygun/apm/sidekiq.rb
|
82
|
-
- lib/raygun/apm/sidekiq/
|
82
|
+
- lib/raygun/apm/sidekiq/middleware.rb
|
83
83
|
- lib/raygun/apm/sidekiq/railtie.rb
|
84
84
|
- lib/raygun/apm/sidekiq/version.rb
|
85
85
|
- raygun-apm-sidekiq.gemspec
|