Class: LogStash::Outputs::Airbrake::Notice

Inherits:
Airbrake::Notice
  • Object
show all
Defined in:
lib/logstash/outputs/airbrake.rb

Overview

class LogStash::Outputs::Airbrake

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Notice



82
83
84
85
86
87
88
89
90
91
# File 'lib/logstash/outputs/airbrake.rb', line 82

def initialize(opts = {})
  super(opts)

  @hostname  = opts[:host] || 'unknown'

  # Airbrake uses the backtrace to aggregate notifications so we cheat and
  # create a dummy backtrace
  error_crc32 = Zlib::crc32(opts[:error_message])
  @backtrace = Airbrake::Backtrace.parse("#{error_crc32}:42:in `#{opts[:error_message]}'")
end