Class: Fluent::RavenDecoderOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::RavenDecoderOutput
- Defined in:
- lib/fluent/plugin/out_raven_decoder.rb
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #emit(tag, es, chain) ⇒ Object
-
#initialize ⇒ RavenDecoderOutput
constructor
A new instance of RavenDecoderOutput.
- #shutdown ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize ⇒ RavenDecoderOutput
16 17 18 19 20 21 |
# File 'lib/fluent/plugin/out_raven_decoder.rb', line 16 def initialize super require 'base64' require 'zlib' require 'multi_json' end |
Instance Method Details
#configure(conf) ⇒ Object
31 32 33 |
# File 'lib/fluent/plugin/out_raven_decoder.rb', line 31 def configure(conf) super end |
#emit(tag, es, chain) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/fluent/plugin/out_raven_decoder.rb', line 35 def emit(tag, es, chain) new_tag = @prefix + '.' + tag es.each do |time, record| data = record[@data_field] if data data = decode(data) router.emit(new_tag, time, data) else log.warn("Raven data is not included: tag:#{new_tag} record:#{record.inspect}") end end chain.next rescue => e log.error(e. + "\n" + e.backtrace.first) end |
#shutdown ⇒ Object
27 28 29 |
# File 'lib/fluent/plugin/out_raven_decoder.rb', line 27 def shutdown super end |
#start ⇒ Object
23 24 25 |
# File 'lib/fluent/plugin/out_raven_decoder.rb', line 23 def start super end |