fluent-plugin-statsd-output 1.1.1 → 1.2.0

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: 04cb520069ed26b5a2c7f483317674a449ef7baf
4
- data.tar.gz: b0371cb1ef493091c034d2da9edfff0729087003
3
+ metadata.gz: fa2a2a4c557eedb6b22bd8ad21a6e18ca9cbbc2e
4
+ data.tar.gz: 715cb7f05330b4bb36f96eb13fac3184743c3359
5
5
  SHA512:
6
- metadata.gz: 75ea9d09d598a5a0e1494128308776dbcbcda7e63a3d94e6c9a270f2409bd82df661debcd587454318d8cabc70fa2376c98461d8ebafeacdad9717ac5d72c287
7
- data.tar.gz: f270d1ce49650640008fcf681276cfea293608a4426b263a28663d5b52e0eedc94a17191b84c5d78e98405d417ddf48004f63f4db3659304292d935ac1fbdb03
6
+ metadata.gz: 118f8ec2c22831258456eff0504dee1c940253fd79c8f508f01170edd49f777485e1c30a1dc09947aaf9a2e8559422c2da411175f4be6689ab853ba5fd6edbca
7
+ data.tar.gz: 806afc9ea2b91580635d660547d48fcf9284b4cc84415791b9451b00f3ec2d33ec52689b6672b8f654c484cc3ac9cd9ec1b52fbe5fa22b8953dfa70e7196619b
data/.gitignore CHANGED
@@ -1,2 +1,4 @@
1
1
  *.swp
2
2
  *.gem
3
+
4
+ spec/examples.txt
@@ -1,30 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-statsd (1.1.0)
4
+ fluent-plugin-statsd-output (1.2.0)
5
5
  fluentd (>= 0.10.8)
6
+ statsd-ruby (~> 1.4)
6
7
 
7
8
  GEM
8
9
  remote: http://rubygems.org/
9
10
  specs:
10
11
  coderay (1.1.1)
11
- cool.io (1.4.4)
12
+ cool.io (1.5.0)
12
13
  diff-lcs (1.2.5)
13
- fluentd (0.14.1)
14
- cool.io (>= 1.4.3, < 2.0.0)
14
+ fluentd (0.14.17)
15
+ cool.io (>= 1.4.5, < 2.0.0)
15
16
  http_parser.rb (>= 0.5.1, < 0.7.0)
16
- json (>= 1.4.3)
17
- msgpack (>= 0.7.0)
18
- serverengine (>= 1.6.4)
17
+ msgpack (>= 0.7.0, < 2.0.0)
18
+ serverengine (>= 2.0.4, < 3.0.0)
19
19
  sigdump (~> 0.2.2)
20
- strptime (>= 0.1.7)
21
- tzinfo (>= 1.0.0)
22
- tzinfo-data (>= 1.0.0)
20
+ strptime (~> 0.1.7)
21
+ tzinfo (~> 1.0)
22
+ tzinfo-data (~> 1.0)
23
23
  yajl-ruby (~> 1.0)
24
24
  http_parser.rb (0.6.0)
25
- json (2.0.1)
26
25
  method_source (0.8.2)
27
- msgpack (1.0.0)
26
+ msgpack (1.1.0)
28
27
  power_assert (0.3.0)
29
28
  pry (0.10.4)
30
29
  coderay (~> 1.1.0)
@@ -43,30 +42,30 @@ GEM
43
42
  diff-lcs (>= 1.2.0, < 2.0)
44
43
  rspec-support (~> 3.5.0)
45
44
  rspec-support (3.5.0)
46
- serverengine (1.6.4)
45
+ serverengine (2.0.5)
47
46
  sigdump (~> 0.2.2)
48
47
  sigdump (0.2.4)
49
48
  slop (3.6.0)
50
- statsd-ruby (1.3.0)
51
- strptime (0.1.8)
49
+ statsd-ruby (1.4.0)
50
+ strptime (0.1.9)
52
51
  test-unit (3.1.8)
53
52
  power_assert
54
- thread_safe (0.3.5)
55
- tzinfo (1.2.2)
53
+ thread_safe (0.3.6)
54
+ tzinfo (1.2.3)
56
55
  thread_safe (~> 0.1)
57
- tzinfo-data (1.2016.6)
56
+ tzinfo-data (1.2017.2)
58
57
  tzinfo (>= 1.0.0)
59
- yajl-ruby (1.2.1)
58
+ yajl-ruby (1.3.0)
60
59
 
61
60
  PLATFORMS
62
61
  ruby
63
62
 
64
63
  DEPENDENCIES
65
- fluent-plugin-statsd!
64
+ fluent-plugin-statsd-output!
66
65
  pry
67
66
  rspec (~> 3.0)
68
67
  statsd-ruby
69
68
  test-unit
70
69
 
71
70
  BUNDLED WITH
72
- 1.10.6
71
+ 1.14.6
data/README.md CHANGED
@@ -16,6 +16,7 @@ $ fluent-gem install fluent-plugin-statsd-output
16
16
  host localhost # optional
17
17
  port 8125 # optional
18
18
  namespace a.b.c # optional
19
+ batch_byte_size 512 # optional
19
20
 
20
21
  <metric>
21
22
  statsd_type timing
@@ -24,8 +25,8 @@ $ fluent-gem install fluent-plugin-statsd-output
24
25
  </metric>
25
26
 
26
27
  <metric>
27
- statsd_type incrument
28
- statsd_key my_app.nginx.${response_code.to_i / 100}xx # 2xx 4xx 5xx
28
+ statsd_type increment
29
+ statsd_key my_app.nginx.${record['response_code'].to_i / 100}xx # 2xx 4xx 5xx
29
30
  </metric>
30
31
  </match>
31
32
  ```
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.1
1
+ 1.2.0
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.require_paths = ['lib']
17
17
 
18
18
  gem.add_dependency "fluentd", ">= 0.10.8"
19
- gem.add_dependency "statsd-ruby", "~> 1.3.0"
19
+ gem.add_dependency "statsd-ruby", "~> 1.4"
20
20
 
21
21
  gem.add_development_dependency "rspec", '~> 3.0'
22
22
  gem.add_development_dependency "test-unit"
@@ -10,6 +10,7 @@ module Fluent
10
10
  config_param :host, :string, :default => 'localhost'
11
11
  config_param :port, :string, :default => '8125'
12
12
  config_param :namespace, :string, :default => nil
13
+ config_param :batch_byte_size, :integer, :default => nil
13
14
 
14
15
  config_section :metric do
15
16
  config_param :statsd_type, :string
@@ -27,6 +28,11 @@ module Fluent
27
28
  super
28
29
  @statsd = Statsd.new(host, port)
29
30
  @statsd.namespace = namespace if namespace
31
+
32
+ if batch_byte_size
33
+ @statsd.batch_size = nil
34
+ @statsd.batch_byte_size = batch_byte_size
35
+ end
30
36
  log.info(statsd)
31
37
 
32
38
  @metrics = conf.elements.select {|elem| elem.name == 'metric' }
@@ -1,3 +1,3 @@
1
1
  example_id | status | run_time |
2
2
  ------------------------------------- | ------ | --------------- |
3
- ./spec/plugin/out_statsd_spec.rb[1:1] | passed | 0.53516 seconds |
3
+ ./spec/plugin/out_statsd_spec.rb[1:1] | passed | 0.54067 seconds |
@@ -6,6 +6,7 @@ RSpec.describe Fluent::StatsdOutput do
6
6
  %{
7
7
  type statsd
8
8
  namespace a.b.c
9
+ batch_byte_size 512
9
10
 
10
11
  <metric>
11
12
  statsd_type timing
@@ -20,7 +21,13 @@ RSpec.describe Fluent::StatsdOutput do
20
21
  }
21
22
  end
22
23
  let(:driver) { create_driver(config) }
23
- let(:statsd) { double('statsd', increment: true, timing: true, 'namespace=' => true) }
24
+ let(:statsd) { double('statsd', increment: true,
25
+ timing: true,
26
+ 'namespace=' => true,
27
+ 'batch_size=' => true,
28
+ 'batch_byte_size' => true)
29
+
30
+ }
24
31
  let(:time) { Time.now.utc }
25
32
 
26
33
  before :all do
@@ -41,6 +48,8 @@ RSpec.describe Fluent::StatsdOutput do
41
48
  allow(Statsd).to receive(:new).and_return(statsd)
42
49
 
43
50
  expect(statsd).to receive(:namespace=).with('a.b.c')
51
+ expect(statsd).to receive(:batch_size=).with(nil)
52
+ expect(statsd).to receive(:batch_byte_size=).with(512)
44
53
 
45
54
  expect(statsd).to receive(:increment).with('res_code_2xx').twice.times
46
55
  expect(statsd).to receive(:increment).with('res_code_4xx').once.times
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-statsd-output
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Song
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-13 00:00:00.000000000 Z
11
+ date: 2017-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.3.0
33
+ version: '1.4'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.3.0
40
+ version: '1.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  requirements: []
119
119
  rubyforge_project:
120
- rubygems_version: 2.4.5.1
120
+ rubygems_version: 2.6.11
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: fluentd output filter plugin to send metrics to Esty StatsD