class Fluent::Plugin::K8sFilter
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/filter_k8s.rb, line 9 def configure(conf) super @tag_compiled = Regexp.compile(@tag_regexp) end
filter(tag, time, record)
click to toggle source
# File lib/fluent/plugin/filter_k8s.rb, line 14 def filter(tag, time, record) tag_match_data = tag.match(@tag_compiled) if !!tag_match_data record['namespace_name']=tag_match_data['namespace'] record['pod_name']=tag_match_data['pod_name'] record['container_name']=tag_match_data['container_name'] end record end