formatted-metrics 1.1.0 → 1.1.1

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: f7edd948c0f2e561a7fba319c15f4708f92cf24e
4
- data.tar.gz: 74220cfe25a93832000aa8620090508f99fef40d
3
+ metadata.gz: dd05373a844e69ff2e42dc4e24c8c741667a7eb3
4
+ data.tar.gz: c0ef9a68d1c6a28239d366150f6b38896a3b2f84
5
5
  SHA512:
6
- metadata.gz: f45582f1080e61c61ae1fd9db73f7c972f17b4c31fb887f95a2bcd3600283f2c0308c53618e4582bad08f3d18899d98dd2b3a5e14904eca772bb5f02eaf51f74
7
- data.tar.gz: bdf3c63a206664ae884c2fd714faa630a95fe8211a1b32e523a62849fed5974c2b32935225d7a73af97d4a86a75464d2a379e7805c4fbc419ab7ee0e9b4fee1b
6
+ metadata.gz: 4bf4bf9259751cad5a97fbf7aeed66b24ae5900159b798a18e54a171ea87c6a521962c369bbdd9754e5610eb2eec7548104f0992a2e828a6784079d80cba6e98
7
+ data.tar.gz: e3daad6ab06807c864a4706a423164719e97015ae21338c983d55a69f637a057fea6452ef835c3f05ff3ddb614d462e46734133645ddc244d9133b1bd867370d
@@ -1,3 +1,3 @@
1
1
  module FormattedMetrics
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
@@ -0,0 +1,21 @@
1
+ module Sidekiq
2
+ module Middleware
3
+ module Server
4
+ class Instrumentation
5
+ include Metrics::Instrumentable
6
+
7
+ def call(worker, item, queue)
8
+ instrument 'sidekiq.job.started', 1, source: ['sidekiq', queue, worker.class.to_s.underscore], type: 'count'
9
+ instrument 'sidekiq.queue.time', source: ['sidekiq', queue, worker.class.to_s.underscore] do
10
+ begin
11
+ yield
12
+ rescue Exception => raised
13
+ instrument 'exception', 1, source: 'sidekiq', type: 'count'
14
+ raise
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formatted-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric J. Holmes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-20 00:00:00.000000000 Z
11
+ date: 2014-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,6 +80,7 @@ files:
80
80
  - lib/metrics/railtie.rb
81
81
  - lib/metrics/version.rb
82
82
  - lib/rack/instrumentation.rb
83
+ - lib/sidekiq/middleware/server/instrumentation.rb
83
84
  - spec/metrics/formatters/l2met_spec.rb
84
85
  - spec/metrics/grouping_spec.rb
85
86
  - spec/metrics/instrumentable_spec.rb
@@ -107,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
108
  version: '0'
108
109
  requirements: []
109
110
  rubyforge_project:
110
- rubygems_version: 2.0.3
111
+ rubygems_version: 2.0.14
111
112
  signing_key:
112
113
  specification_version: 4
113
114
  summary: Easily output formatted metrics to stdout