scout_apm 2.1.15 → 2.1.16

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
  SHA1:
3
- metadata.gz: 2432d4b3a94011da560df94d67bfda1c0e58ed80
4
- data.tar.gz: bafd8c126d8ea5e1329d7d9e119ce24cacea9af3
3
+ metadata.gz: 29e9f474f0b675658b415e0d23a1f498217b1edd
4
+ data.tar.gz: 870419ac7831ba6bed3fe631b86cab7858125f70
5
5
  SHA512:
6
- metadata.gz: 766e322ec27e6ba797cb7756e67975e2b4c41b3cc5c1ad957054445e798b05c75878e28d46641f6d6fc5ff86dfb8351d4500a5264f5aa7d3f9f778715b8c7517
7
- data.tar.gz: 62a7ce7ee17fcfed6011fba1b62fb40795ba7c5b31fc6a7bd2d20f17c9af2c84ffe3c9c3bd56a513b6561f8cb3170fe078c76e1dd6892df22a03d1facc0555e0
6
+ metadata.gz: dd9b7433c16697e9a5757f7f5839a48ea5ddd5dfe7f8ea69e7eca137020f90a7670d2ee7bd0395e2b66787f9328884d3087cc09628c17cb2c52bb9813b165f4a
7
+ data.tar.gz: 3e77160ad682754733aefe1a6d8be67b3a70274f3685c006fdad8c37834d3a45263724255cdab3407b4c50e7ebe7da5748085895dbd1762969dc6f798ebfd06e
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,7 @@
1
+ # 2.1.16
2
+
3
+ * Extract the name correctly for DelayedJob workers run via ActiveJob
4
+
1
5
  # 2.1.15
2
6
 
3
7
  * Limit memory usage for very long running requests.
@@ -1,6 +1,8 @@
1
1
  module ScoutApm
2
2
  module BackgroundJobIntegrations
3
3
  class DelayedJob
4
+ ACTIVE_JOB_KLASS = 'ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper'.freeze
5
+
4
6
  attr_reader :logger
5
7
 
6
8
  def name
@@ -23,7 +25,15 @@ module ScoutApm
23
25
  lifecycle.around(:invoke_job) do |job, *args, &block|
24
26
  ScoutApm::Agent.instance.start_background_worker unless ScoutApm::Agent.instance.background_worker_running?
25
27
 
26
- name = job.name
28
+ name = begin
29
+ if job.payload_object.class.to_s == ACTIVE_JOB_KLASS
30
+ job.payload_object.job_data["job_class"]
31
+ else
32
+ job.name
33
+ end
34
+ rescue
35
+ job.name
36
+ end
27
37
  queue = job.queue || "default"
28
38
 
29
39
  req = ScoutApm::RequestManager.lookup
@@ -1,4 +1,4 @@
1
1
  module ScoutApm
2
- VERSION = "2.1.15"
2
+ VERSION = "2.1.16"
3
3
  end
4
4
 
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.15
4
+ version: 2.1.16
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: 2016-11-10 00:00:00.000000000 Z
12
+ date: 2016-11-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest