Class: Fluent::EC2MetadataOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::EC2MetadataOutput
- Includes:
- EC2Metadata
- Defined in:
- lib/fluent/plugin/out_ec2_metadata.rb
Instance Attribute Summary collapse
-
#ec2_metadata ⇒ Object
readonly
Returns the value of attribute ec2_metadata.
Instance Method Summary collapse
Methods included from EC2Metadata
Instance Attribute Details
#ec2_metadata ⇒ Object (readonly)
Returns the value of attribute ec2_metadata.
19 20 21 |
# File 'lib/fluent/plugin/out_ec2_metadata.rb', line 19 def @ec2_metadata end |
Instance Method Details
#emit(tag, es, chain) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fluent/plugin/out_ec2_metadata.rb', line 21 def emit(tag, es, chain) tag_parts = tag.split('.') es.each { |time, record| new_tag, new_record = modify(@output_tag, record, tag, tag_parts) router.emit(new_tag, time, new_record) } chain.next rescue => e $log.warn "ec2-metadata: #{e.class} #{e.} #{e.backtrace.join(', ')}" end |