Class: Airbrake::CollectingSender

Inherits:
Sender
  • Object
show all
Defined in:
lib/airbrake/sender.rb

Constant Summary

Constants inherited from Sender

Sender::HEADERS, Sender::HTTP_ERRORS, Sender::JSON_API_URI, Sender::NOTICES_URI

Instance Attribute Summary collapse

Attributes inherited from Sender

#api_key, #host, #http_open_timeout, #http_read_timeout, #port, #project_id, #protocol, #proxy_host, #proxy_pass, #proxy_port, #proxy_user, #secure, #use_system_ssl_cert_chain

Instance Method Summary collapse

Methods inherited from Sender

#initialize

Constructor Details

This class inherits a constructor from Airbrake::Sender

Instance Attribute Details

#last_notice_pathObject



197
198
199
# File 'lib/airbrake/sender.rb', line 197

def last_notice_path
  File.expand_path(File.join("..", "..", "..", "resources", "notice.xml"), __FILE__)
end

Instance Method Details

#last_noticeObject



193
194
195
# File 'lib/airbrake/sender.rb', line 193

def last_notice
  File.read last_notice_path
end

#send_to_airbrake(notice) ⇒ Object



201
202
203
204
205
206
207
208
209
210
211
# File 'lib/airbrake/sender.rb', line 201

def send_to_airbrake(notice)
  data = prepare_notice(notice)

  notices_file = File.open(last_notice_path, "w") do |file|
    file.puts data
  end

  super(notice)
ensure
  notices_file.close if notices_file
end