nsa 0.1.0 → 0.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: 911dad2e98c8f5fbd1f15023ed5c547930c2e2ec
4
- data.tar.gz: 6c2123585565c8eb5eb41f54a141f3be57431d11
3
+ metadata.gz: f8bdfbae20466016d5db607c944f63ce3a46a47c
4
+ data.tar.gz: 4b8dea2faaeebafdce145bebb0ccd285221f6bad
5
5
  SHA512:
6
- metadata.gz: ad14487a0c6ed7a63c8ea14f734775faaa0729412e7dc150601620e967503c20300bb2829901784f275412634c88fd70aff471c62a47e9cf4585b412dbd61764
7
- data.tar.gz: c6ae6b0d35649f93f735ea3d995f7b8a86bcbd40667f72334e803369ef1c6bc8ac809c4c861f4aa2bce798db5b5acba02587d97686628632a93f02bbd740350a
6
+ metadata.gz: 999bcc2be8968a66c23bff9662bff68ee0cc766aa8b36bcf5f98c83caf019ce492b2cd25fb558912f6f1d436712147ed0b0daf3fa6438015f237f0c39b42239e
7
+ data.tar.gz: 28a3bc1173dcdf14e8ad1cf210bbf7b6a5fe6d157c80d6f2c96fbd70258ffed4f7e63d304e53b91750261d563d654e83d9e61ce189e5cb91da0952fe90e6b5b6
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # NSA (National Statsd Agency)
2
2
 
3
- Listen to your Rails ActiveSupport::Notifications and deliver to a Statsd backend.
4
- Support for writing your own custom collectors.
3
+ Listen to Rails `ActiveSupport::Notifications` and deliver to a [Statsd](https://github.com/reinh/statsd) backend.
4
+ This gem also supports writing your own custom collectors.
5
5
 
6
6
  ## Installation
7
7
 
@@ -47,7 +47,7 @@ end
47
47
 
48
48
  ### `:action_controller`
49
49
 
50
- Listens to: `process_action.action_controller
50
+ Listens to: `process_action.action_controller`
51
51
 
52
52
  Metrics recorded:
53
53
 
@@ -1,8 +1,12 @@
1
+ require "statsd-ruby"
2
+
1
3
  module NSA
2
4
  module Statsd
3
5
  module Subscriber
4
6
 
5
7
  def statsd_subscribe(backend)
8
+ fail "Backend must be a Statsd object. Got '#{backend.class.name}' instead." unless backend.is_a?(::String)
9
+
6
10
  ::ActiveSupport::Notifications.subscribe(/.statsd$/) do |name, start, finish, id, payload|
7
11
  __send_event_to_statsd(backend, name, start, finish, id, payload)
8
12
  end
data/lib/nsa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module NSA
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/nsa.gemspec CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency "activesupport", "~> 4.2.0"
22
22
  spec.add_dependency "sidekiq", "~> 3.5.0"
23
+ spec.add_dependency "statsd-ruby", "~> 1.2.0"
23
24
 
24
25
  spec.add_development_dependency "bundler", "~> 1.10"
25
26
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nsa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BJ Neilsen
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 3.5.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: statsd-ruby
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.2.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.2.0
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement