Class: Fluent::Plugin::ParseRequestBodyOutput

Inherits:
Output
  • Object
show all
Includes:
HandleTagNameMixin
Defined in:
lib/fluent/plugin/out_parse_request_body.rb

Instance Method Summary collapse

Instance Method Details

#configure(conf) ⇒ Object

初始化解析器#



42
43
44
45
# File 'lib/fluent/plugin/out_parse_request_body.rb', line 42

def configure(conf)
  super
  @extractor = Fluent::Plugin::ParseRequestBodyExtractor.new(self, conf)
end

#filter_record(tag, time, record) ⇒ Object

执行解析工作#



52
53
54
55
# File 'lib/fluent/plugin/out_parse_request_body.rb', line 52

def filter_record(tag, time, record)
  record = @extractor.add_query_params_field(record)
  super(tag, time, record)
end

#multi_workers_ready?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/fluent/plugin/out_parse_request_body.rb', line 47

def multi_workers_ready?
  true
end

#process(tag, es) ⇒ Object



57
58
59
60
61
62
63
# File 'lib/fluent/plugin/out_parse_request_body.rb', line 57

def process(tag, es)
  es.each do |time, record|
    t = tag.dup
    filter_record(t, time, record)
    router.emit(t, time, record)
  end
end