Class: Fluent::AppendKubernetesAnnotationsToTag
- Inherits:
-
Output
- Object
- Output
- Fluent::AppendKubernetesAnnotationsToTag
- Defined in:
- lib/fluent/plugin/out_append_kubernetes_annotations_to_tag.rb
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
10 11 12 13 14 |
# File 'lib/fluent/plugin/out_append_kubernetes_annotations_to_tag.rb', line 10 def configure(conf) super @annotations = conf['annotations'].split(',') end |
#emit(tag, es, chain) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/fluent/plugin/out_append_kubernetes_annotations_to_tag.rb', line 16 def emit(tag, es, chain) es.each do |time, record| new_tag = process_tag(tag, record) next if new_tag == tag router.emit(new_tag, time, record) end chain.next rescue => exception log.error "Failed to re-format docker record #{tag}" log.error exception log.error exception.backtrace # this seems to be a way to safely swallow records we don't know how to format "" end |