ffwd-statsd 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ffwd/plugin/statsd/connection.rb +5 -1
- data/lib/ffwd/plugin/statsd/version.rb +1 -1
- data/lib/ffwd/plugin/statsd.rb +2 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e69f88535a23966022730b38b128daac3edfcc3f
|
4
|
+
data.tar.gz: bb2390a8fca43a77d762aede13332875d95a4e3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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}"
|
data/lib/ffwd/plugin/statsd.rb
CHANGED
@@ -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
|
+
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
|
+
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.
|
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.
|
26
|
+
version: 0.3.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|