lib/fluent/plugin/out_statsd.rb in fluent-plugin-statsd-output-1.1.1 vs lib/fluent/plugin/out_statsd.rb in fluent-plugin-statsd-output-1.2.0
- old
+ new
@@ -8,10 +8,11 @@
config_param :flush_interval, :time, :default => 1
config_param :host, :string, :default => 'localhost'
config_param :port, :string, :default => '8125'
config_param :namespace, :string, :default => nil
+ config_param :batch_byte_size, :integer, :default => nil
config_section :metric do
config_param :statsd_type, :string
config_param :statsd_key, :string
config_param :statsd_val, :string, default: nil
@@ -25,9 +26,14 @@
def configure(conf)
super
@statsd = Statsd.new(host, port)
@statsd.namespace = namespace if namespace
+
+ if batch_byte_size
+ @statsd.batch_size = nil
+ @statsd.batch_byte_size = batch_byte_size
+ end
log.info(statsd)
@metrics = conf.elements.select {|elem| elem.name == 'metric' }
log.info(@metrics)
end