sidekiq-datadog 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +25 -16
- data/lib/sidekiq/datadog/version.rb +1 -1
- data/lib/sidekiq/middleware/server/datadog.rb +2 -2
- data/spec/sidekiq/middleware/server/datadog_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d736d6748ea19acf02964aeb276aa6a5b3c66bd
|
4
|
+
data.tar.gz: 1cec0a5c2de0c9ad8ac00e7ce13e8f5b4d2ed30d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b4dae813bf0341699137c72f59a5ca1c309c6c394cfc3958b41d0a09606c8529d23abc34c61ff990252dfb0fce68065e670aee3fd2574b05bf8b844286d4231
|
7
|
+
data.tar.gz: f20c74e493446161e28c93bde6c75237fb0283a4c1e1598a702a0cb021de35df2c7819e5db065fae163d52771499cfe05c83c29e44a6b194a50a1cc7ed23988d
|
data/Gemfile.lock
CHANGED
@@ -1,36 +1,45 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sidekiq-datadog (0.3.
|
4
|
+
sidekiq-datadog (0.3.2)
|
5
5
|
dogstatsd-ruby
|
6
6
|
sidekiq
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
concurrent-ruby (1.0.
|
11
|
+
concurrent-ruby (1.0.2)
|
12
12
|
connection_pool (2.2.0)
|
13
13
|
diff-lcs (1.2.5)
|
14
14
|
dogstatsd-ruby (1.6.0)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
rspec-
|
23
|
-
|
15
|
+
rack (1.6.4)
|
16
|
+
rack-protection (1.5.3)
|
17
|
+
rack
|
18
|
+
rake (11.2.2)
|
19
|
+
redis (3.3.1)
|
20
|
+
rspec (3.5.0)
|
21
|
+
rspec-core (~> 3.5.0)
|
22
|
+
rspec-expectations (~> 3.5.0)
|
23
|
+
rspec-mocks (~> 3.5.0)
|
24
|
+
rspec-core (3.5.2)
|
25
|
+
rspec-support (~> 3.5.0)
|
26
|
+
rspec-expectations (3.5.0)
|
24
27
|
diff-lcs (>= 1.2.0, < 2.0)
|
25
|
-
rspec-support (~> 3.
|
26
|
-
rspec-mocks (3.
|
28
|
+
rspec-support (~> 3.5.0)
|
29
|
+
rspec-mocks (3.5.0)
|
27
30
|
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
-
rspec-support (~> 3.
|
29
|
-
rspec-support (3.
|
30
|
-
sidekiq (4.1.
|
31
|
+
rspec-support (~> 3.5.0)
|
32
|
+
rspec-support (3.5.0)
|
33
|
+
sidekiq (4.1.4)
|
31
34
|
concurrent-ruby (~> 1.0)
|
32
35
|
connection_pool (~> 2.2, >= 2.2.0)
|
33
36
|
redis (~> 3.2, >= 3.2.1)
|
37
|
+
sinatra (>= 1.4.7)
|
38
|
+
sinatra (1.4.7)
|
39
|
+
rack (~> 1.5)
|
40
|
+
rack-protection (~> 1.4)
|
41
|
+
tilt (>= 1.3, < 3)
|
42
|
+
tilt (2.0.5)
|
34
43
|
|
35
44
|
PLATFORMS
|
36
45
|
ruby
|
@@ -57,8 +57,8 @@ module Sidekiq
|
|
57
57
|
|
58
58
|
def record(worker, job, queue, start, error = nil)
|
59
59
|
ms = ((Time.now - start) * 1000).round
|
60
|
-
if job["
|
61
|
-
queued_ms = start - Time.at(job["
|
60
|
+
if job["enqueued_at"]
|
61
|
+
queued_ms = start - Time.at(job["enqueued_at"])
|
62
62
|
end
|
63
63
|
name = underscore(job['wrapped'] || worker.class.to_s)
|
64
64
|
tags = @tags.map do |tag|
|
@@ -9,7 +9,7 @@ describe Sidekiq::Middleware::Server::Datadog do
|
|
9
9
|
subject { described_class.new hostname: "test.host", statsd: statsd, tags: ["custom:tag", lambda{|w, *| "worker:#{w.class.name[1..2]}" }] }
|
10
10
|
|
11
11
|
it 'should send an increment and timing event for each job run' do
|
12
|
-
subject.call(worker, {
|
12
|
+
subject.call(worker, { 'enqueued_at' => 1461881794.9312189 }, 'default') { "ok" }
|
13
13
|
expect(statsd.buffer).to eq([
|
14
14
|
"sidekiq.job:1|c|#custom:tag,worker:oc,host:test.host,env:test,name:mock/worker,queue:default,status:ok",
|
15
15
|
"sidekiq.job.time:333|ms|#custom:tag,worker:oc,host:test.host,env:test,name:mock/worker,queue:default,status:ok",
|
@@ -18,7 +18,7 @@ describe Sidekiq::Middleware::Server::Datadog do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'should support wrappers' do
|
21
|
-
subject.call(worker, { '
|
21
|
+
subject.call(worker, { 'enqueued_at' => 1461881794.9312189, 'wrapped' => 'wrap'}, nil) { "ok" }
|
22
22
|
expect(statsd.buffer).to eq([
|
23
23
|
"sidekiq.job:1|c|#custom:tag,worker:oc,host:test.host,env:test,name:wrap,status:ok",
|
24
24
|
"sidekiq.job.time:333|ms|#custom:tag,worker:oc,host:test.host,env:test,name:wrap,status:ok",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-datadog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitrij Denissenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|