ffwd-statsd 0.3.4 → 0.3.5

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: d76a4abb348da0f699de7ae09b3d817b4bf48076
4
- data.tar.gz: 83cd267d37c956c28c98f500e1df8a102eb0bf3d
3
+ metadata.gz: e69f88535a23966022730b38b128daac3edfcc3f
4
+ data.tar.gz: bb2390a8fca43a77d762aede13332875d95a4e3b
5
5
  SHA512:
6
- metadata.gz: 02315d35d381a82e0e4779b222daba4f3983759f6a79eab744b0986c32cb37dbfa952223e3d903135564a9fc905d90d3633fc4e2255637b7dd480842fa569717
7
- data.tar.gz: a41246899280bad9255c02cfff0aa29327a575dc505d3c2ecd8cbb374d68f48724eedfd3078b9b107d2b45893894861ae1ef7ba0c6d0fbc48336cbfe89a0fcf2
6
+ metadata.gz: 14cb97a44a4eafe52007a35436fd14c4134ace5f9e8683e4b77306f2abe52c09d94c0b37cf0228399bfdb731f1b7a415c46986c4fc59b81ebea0533493efb3ea
7
+ data.tar.gz: eb75e28a4c14a9c8c6853f5e735f32744e5432ebd5a1e678c327045b4e914a45a7fabfb5caaca24dab5c2e94d2b5b399d46a5aadbf75f77aeefe0dca43604075
@@ -22,12 +22,16 @@ module FFWD::Plugin::Statsd
22
22
  def initialize bind, core, config
23
23
  @bind = bind
24
24
  @core = core
25
+ @key = config[:key]
25
26
  end
26
27
 
27
28
  protected
28
29
 
29
30
  def receive_statsd_frame(data)
30
- @core.input.metric Parser.parse(data)
31
+ frame = Parser.parse(data)
32
+ a = {:what => frame[:key]}
33
+ m = {:key => @key, :proc => frame[:proc], :attributes => a}
34
+ @core.input.metric m
31
35
  @bind.increment :received_metrics
32
36
  rescue ParserError => e
33
37
  log.error "Invalid frame '#{data}': #{e}"
@@ -16,7 +16,7 @@
16
16
  module FFWD
17
17
  module Plugin
18
18
  module Statsd
19
- VERSION = "0.3.4"
19
+ VERSION = "0.3.5"
20
20
  end
21
21
  end
22
22
  end
@@ -28,6 +28,7 @@ module FFWD::Plugin::Statsd
28
28
  DEFAULT_HOST = "localhost"
29
29
  DEFAULT_PORT = 8125
30
30
  DEFAULT_PROTOCOL = "udp"
31
+ DEFAULT_KEY = "statsd"
31
32
 
32
33
  class InputUDP < FFWD::Plugin::Statsd::Connection
33
34
  def self.plugin_type
@@ -59,6 +60,7 @@ module FFWD::Plugin::Statsd
59
60
  config[:host] ||= DEFAULT_HOST
60
61
  config[:port] ||= DEFAULT_PORT
61
62
  config[:protocol] ||= DEFAULT_PROTOCOL
63
+ config[:key] ||= DEFAULT_KEY
62
64
 
63
65
  protocol = FFWD.parse_protocol config[:protocol]
64
66
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffwd-statsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John-John Tedro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-11 00:00:00.000000000 Z
11
+ date: 2014-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffwd
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.3.4
19
+ version: 0.3.5
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.3.4
26
+ version: 0.3.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement