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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8043891b229caf308e08b902fade3f2ae4bf959
4
- data.tar.gz: 0f12bab2a9ab38efc1d77742b74dfb700ffad439
3
+ metadata.gz: 4d736d6748ea19acf02964aeb276aa6a5b3c66bd
4
+ data.tar.gz: 1cec0a5c2de0c9ad8ac00e7ce13e8f5b4d2ed30d
5
5
  SHA512:
6
- metadata.gz: 19c3f2ee20b3a66ef3eab88abddbfe32709c594a72db5d87b79e3096ddbdcb6540cfe76a606fbf97c06cf3b56ad0bc8925779553905847b09aa320aa3b1610c2
7
- data.tar.gz: be99a4d3b34abed38c26e0f7745bd8919b0faa050091368e23bb60890b21f6d9b38e7d3d0aff7c13c5766c5cc67d23a810369426c89bb0f985ed3312370c7eb8
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.1)
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.1)
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
- rake (11.1.2)
16
- redis (3.3.0)
17
- rspec (3.4.0)
18
- rspec-core (~> 3.4.0)
19
- rspec-expectations (~> 3.4.0)
20
- rspec-mocks (~> 3.4.0)
21
- rspec-core (3.4.4)
22
- rspec-support (~> 3.4.0)
23
- rspec-expectations (3.4.0)
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.4.0)
26
- rspec-mocks (3.4.1)
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.4.0)
29
- rspec-support (3.4.1)
30
- sidekiq (4.1.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
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Datadog
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
@@ -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["created_at"]
61
- queued_ms = start - Time.at(job["created_at"])
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, { "created_at" => 1461881794.9312189 }, 'default') { "ok" }
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, { 'created_at' => 1461881794.9312189, 'wrapped' => 'wrap'}, nil) { "ok" }
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.1
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-04-29 00:00:00.000000000 Z
11
+ date: 2016-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq