adp-fluent-plugin-graphite 0.0.3 → 0.0.7

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
  SHA256:
3
- metadata.gz: c8f41b1f8236d22138026f93a01dd8b8c8f275f65264849010902d95656e8e21
4
- data.tar.gz: cf890fcb37148e913069411c28dcf5c9883e92a172a07c369000cadf861ed661
3
+ metadata.gz: 2cf1fde65bf527feec4f5bdcb3a1ac13c4e3479f7695a1662bd0484e4759ba9d
4
+ data.tar.gz: 95dc1c0ec5507f58d0d1d98b7ce9979ae2760f2926010b971e72bf4acfc56313
5
5
  SHA512:
6
- metadata.gz: 783602a7e1ffd0adeb5e5d70a621f2ca4de1df69372f673f0140b8d52b4523310b8aafb5b34005cbb7d7c447861d7bacda89de326af6e84e94483632b7607a5f
7
- data.tar.gz: a3c1e3fa7536d6c18bc7b6b8c074423063efad4e47b0f6e6eea1726838e16ff391de465c564426ed0fbf2c33b971587769f6918815f2d5261c6e10f5f23a3d3c
6
+ metadata.gz: 07c509264532d610cfb79f5b1d91d06e3d52a3fd5911169f290a6ffab67b6ea7484592b34b7d7a8aeb0b9693792e45ea4a89115b57786cc51955f5f02d7ec0fb
7
+ data.tar.gz: '059c7d712b4cbc8030b48c1201ffccbf15ee42f54b6daad61c300deffc2bb808e69a23910dca5250e2475a304da8627fedb36a31342c6a05f028ccb2664e9a7f'
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = 'adp-fluent-plugin-graphite'
6
- gem.version = '0.0.3'
6
+ gem.version = '0.0.7'
7
7
  gem.authors = ['Satoshi SUZUKI']
8
8
  gem.email = 'studio3104.com@gmail.com'
9
9
  gem.homepage = 'https://github.com/studio3104/fluent-plugin-graphite'
@@ -5,7 +5,6 @@ module Fluent::Plugin
5
5
  class GraphiteOutput < Output
6
6
  Fluent::Plugin.register_output('graphite', self)
7
7
 
8
- include Fluent::HandleTagNameMixin
9
8
  include Fluent::Mixin::RewriteTagName
10
9
 
11
10
  config_param :host, :string
@@ -13,11 +12,7 @@ module Fluent::Plugin
13
12
  config_param :tag_for, :string, default: 'prefix'
14
13
  config_param :name_keys, :string, default: nil
15
14
  config_param :name_key_pattern, :string, default: nil
16
-
17
- # Define `log` method for v0.10.42 or earlier
18
- unless method_defined?(:log)
19
- define_method(:log) { $log }
20
- end
15
+ config_param :max_retries, :integer, default: 3
21
16
 
22
17
  def initialize
23
18
  super
@@ -32,32 +27,18 @@ module Fluent::Plugin
32
27
 
33
28
  def configure(conf)
34
29
  super
35
-
36
- if !['prefix', 'suffix', 'ignore'].include?(@tag_for)
37
- raise Fluent::ConfigError, 'out_graphite: can specify to tag_for only prefix, suffix or ignore'
38
- end
39
-
40
- if !@name_keys && !@name_key_pattern
41
- raise Fluent::ConfigError, 'out_graphite: missing both of name_keys and name_key_pattern'
42
- end
43
- if @name_keys && @name_key_pattern
44
- raise Fluent::ConfigError, 'out_graphite: cannot specify both of name_keys and name_key_pattern'
30
+ if (!@tag && !@remove_tag_prefix && !@remove_tag_suffix && !@add_tag_prefix && !@add_tag_suffix)
31
+ raise Fluent::ConfigError, "foo_bar: missing remove_tag_prefix, remove_tag_suffix, add_tag_prefix or add_tag_suffix."
45
32
  end
46
-
47
33
  if @name_keys
48
34
  @name_keys = @name_keys.split(',')
49
35
  end
50
- if @name_key_pattern
51
- @name_key_pattern = Regexp.new(@name_key_pattern)
52
- end
53
- # How many times to retry the call if timeout raised
54
- @max_retries ||= 3
55
36
  end
56
37
 
57
38
  def emit(tag, es, chain)
58
39
  es.each do |time, record|
59
40
  emit_tag = tag.dup
60
- filter_record(emit_tag, time, record)
41
+ log.info("Emit graphite plugin: #{record}")
61
42
  next unless metrics = format_metrics(emit_tag, record)
62
43
 
63
44
  # implemented to immediate call post method in this loop, because graphite-api.gem has the buffers.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adp-fluent-plugin-graphite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Satoshi SUZUKI