scout_apm 2.1.31 → 2.1.32
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 13a92807ec823e335d8c008de7b2ee934f2b2a5a
|
|
4
|
+
data.tar.gz: 0914f1345038c081b84dd22ee1b98f009cbd8bb5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 917cd00759988d396425711cc5471641edbf8c02a5434e2cea567a6d4bb1aea8fdb06b429950289631b7338432a528a9bd82033a154c6ccdf58a5ca835deed4d
|
|
7
|
+
data.tar.gz: 958687024b4bc80bf5c7364196b0a06c8cfc61e3afce63777c0fa31a5203c6ba892a7089a58e0539d2a6976c53fae2f4557f47a279eea89718d0d9cdc2cb0dc1
|
data/CHANGELOG.markdown
CHANGED
|
@@ -55,8 +55,6 @@ module ScoutApm
|
|
|
55
55
|
# We insert this middleware into the Sidekiq stack, to capture each job,
|
|
56
56
|
# and time them.
|
|
57
57
|
class SidekiqMiddleware
|
|
58
|
-
ACTIVE_JOB_KLASS = 'ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper'.freeze
|
|
59
|
-
|
|
60
58
|
def call(_worker, msg, queue)
|
|
61
59
|
req = ScoutApm::RequestManager.lookup
|
|
62
60
|
req.job!
|
|
@@ -79,12 +77,30 @@ module ScoutApm
|
|
|
79
77
|
end
|
|
80
78
|
|
|
81
79
|
UNKNOWN_CLASS_PLACEHOLDER = 'UnknownJob'.freeze
|
|
80
|
+
ACTIVE_JOB_KLASS = 'ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper'.freeze
|
|
81
|
+
DELAYED_WRAPPER_KLASS = 'Sidekiq::Extensions::DelayedClass'.freeze
|
|
82
|
+
|
|
82
83
|
|
|
83
84
|
def job_class(msg)
|
|
84
85
|
job_class = msg.fetch('class', UNKNOWN_CLASS_PLACEHOLDER)
|
|
86
|
+
|
|
85
87
|
if job_class == ACTIVE_JOB_KLASS && msg.key?('wrapped')
|
|
86
|
-
|
|
88
|
+
begin
|
|
89
|
+
job_class = msg['wrapped']
|
|
90
|
+
rescue
|
|
91
|
+
ACTIVE_JOB_KLASS
|
|
92
|
+
end
|
|
93
|
+
elsif job_class == DELAYED_WRAPPER_KLASS
|
|
94
|
+
begin
|
|
95
|
+
yml = msg['args'].first
|
|
96
|
+
deserialized_args = YAML.load(yml)
|
|
97
|
+
klass, method, *rest = deserialized_args
|
|
98
|
+
job_class = [klass,method].map(&:to_s).join(".")
|
|
99
|
+
rescue
|
|
100
|
+
DELAYED_WRAPPER_KLASS
|
|
101
|
+
end
|
|
87
102
|
end
|
|
103
|
+
|
|
88
104
|
job_class
|
|
89
105
|
rescue
|
|
90
106
|
UNKNOWN_CLASS_PLACEHOLDER
|
|
@@ -5,6 +5,11 @@ module ScoutApm
|
|
|
5
5
|
job_name = self.to_s
|
|
6
6
|
queue = find_queue
|
|
7
7
|
|
|
8
|
+
if job_name == "ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper"
|
|
9
|
+
job_name = args.first["job_class"] rescue job_name
|
|
10
|
+
queue = args.first["queue_name"] rescue queue_name
|
|
11
|
+
end
|
|
12
|
+
|
|
8
13
|
req = ScoutApm::RequestManager.lookup
|
|
9
14
|
req.job!
|
|
10
15
|
|
data/lib/scout_apm/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: scout_apm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.32
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Derek Haynes
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2017-09-
|
|
12
|
+
date: 2017-09-11 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: minitest
|