formatted-metrics 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -40,11 +40,11 @@ Metrics.instrument 'sidekiq.queue', source: 'background' do
40
40
  end
41
41
  # => 'source=app.background measure.sidekiq.queue=500ms'
42
42
 
43
- Metrics.group 'sidekiq' do
44
- instrument 'queues.process', 100, units: 'jobs'
45
- instrument 'workers.busy', 10, units: 'workers'
43
+ Metrics.group 'sidekiq' do |group|
44
+ group.instrument 'queues.process', 100, units: 'jobs'
45
+ group.instrument 'workers.busy', 10, units: 'workers'
46
46
 
47
- instrument 'queue.time', source: 'worker.1' do
47
+ group.instrument 'queue.time', source: 'worker.1' do
48
48
  sleep 1
49
49
  end
50
50
  end
data/lib/metrics.rb CHANGED
@@ -56,6 +56,10 @@ module Metrics
56
56
  Handler.handle(Grouping.instrument(*args, &block))
57
57
  end
58
58
 
59
+ def subscribe
60
+ $stderr.puts "Metrics#subscribe is deprecated and will be removed in 1.0."
61
+ end
62
+
59
63
  def configuration
60
64
  @configuration ||= Configuration.new
61
65
  end
@@ -1,7 +1,4 @@
1
1
  module Metrics
2
2
  class Railtie < ::Rails::Railtie
3
- initializer 'metrics.subscribe' do
4
- Metrics.subscribe
5
- end
6
3
  end
7
4
  end
@@ -1,3 +1,3 @@
1
1
  module FormattedMetrics
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formatted-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -106,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  segments:
108
108
  - 0
109
- hash: 911908351161630628
109
+ hash: -3219838267565125949
110
110
  required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements:
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  segments:
117
117
  - 0
118
- hash: 911908351161630628
118
+ hash: -3219838267565125949
119
119
  requirements: []
120
120
  rubyforge_project:
121
121
  rubygems_version: 1.8.23