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 +4 -4
- data/lib/metrics/version.rb +1 -1
- data/lib/sidekiq/middleware/server/instrumentation.rb +21 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd05373a844e69ff2e42dc4e24c8c741667a7eb3
|
4
|
+
data.tar.gz: c0ef9a68d1c6a28239d366150f6b38896a3b2f84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bf4bf9259751cad5a97fbf7aeed66b24ae5900159b798a18e54a171ea87c6a521962c369bbdd9754e5610eb2eec7548104f0992a2e828a6784079d80cba6e98
|
7
|
+
data.tar.gz: e3daad6ab06807c864a4706a423164719e97015ae21338c983d55a69f637a057fea6452ef835c3f05ff3ddb614d462e46734133645ddc244d9133b1bd867370d
|
data/lib/metrics/version.rb
CHANGED
@@ -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.
|
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:
|
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.
|
111
|
+
rubygems_version: 2.0.14
|
111
112
|
signing_key:
|
112
113
|
specification_version: 4
|
113
114
|
summary: Easily output formatted metrics to stdout
|