sidekiq-skylight 0.0.3 → 0.0.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3443a4fe1cb4b12ba1f62189c03689fa9637d94e
|
4
|
+
data.tar.gz: 6e31c081e4403f5a0196e0c7ab77165c15fcb04a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cda709bddcee26addacc9ab156d0520187aa83e37c6bf5b49d95aa55194a1fde31333da4b18fd97b91e7b235e3e371f63e2b639a6c389b754de792409e4dd80b
|
7
|
+
data.tar.gz: 8b635e7e007a502bb24c7f9c554edbf4940aec00b4c049ff0f568040b67618cc42416ce5c49653410afdc9569ffa55fcebee7a1077e0a96ad101e42770ea4a1a
|
@@ -4,7 +4,7 @@ module Sidekiq
|
|
4
4
|
module Skylight
|
5
5
|
class ServerMiddleware
|
6
6
|
def call(worker, job, queue)
|
7
|
-
::Skylight.
|
7
|
+
::Skylight.trace("#{worker.class.to_s}#perform", 'app.sidekiq.worker', 'process') do
|
8
8
|
yield
|
9
9
|
end
|
10
10
|
end
|
@@ -3,9 +3,11 @@ require 'spec_helper'
|
|
3
3
|
describe Sidekiq::Skylight::ServerMiddleware do
|
4
4
|
subject(:middleware){described_class.new}
|
5
5
|
|
6
|
+
FakeWorker = Class.new
|
7
|
+
|
6
8
|
it 'wraps block in skylight instrument' do
|
7
|
-
expect(::Skylight).to receive(:
|
9
|
+
expect(::Skylight).to receive(:trace).with('FakeWorker#perform', 'app.sidekiq.worker', 'process'){|&block| block.call}
|
8
10
|
|
9
|
-
expect{|probe| middleware.call(
|
11
|
+
expect{|probe| middleware.call(FakeWorker.new, double(:job), double(:queue), &probe)}.to yield_control
|
10
12
|
end
|
11
13
|
end
|