Class: Fluent::Plugin::ElasticsearchGenidFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/fluent/plugin/filter_elasticsearch_genid.rb

Instance Method Summary collapse

Constructor Details

#initializeElasticsearchGenidFilter

Returns a new instance of ElasticsearchGenidFilter.



11
12
13
# File 'lib/fluent/plugin/filter_elasticsearch_genid.rb', line 11

def initialize
  super
end

Instance Method Details

#configure(conf) ⇒ Object



15
16
17
# File 'lib/fluent/plugin/filter_elasticsearch_genid.rb', line 15

def configure(conf)
  super
end

#filter(tag, time, record) ⇒ Object



19
20
21
22
# File 'lib/fluent/plugin/filter_elasticsearch_genid.rb', line 19

def filter(tag, time, record)
  record[@hash_id_key] = Base64.strict_encode64(SecureRandom.uuid)
  record
end