Skip to content
Go library to report errors to airbrake and compatible servers
Go
Find file
Latest commit a3cdd91 Oct 5, 2015 @Sirupsen Sirupsen Merge pull request #16 from gemnasium/timeout_requests
Use a httpClient with a default timeout
Failed to load latest commit information.
LICENSE
README
airbrake.go
airbrake_test.go scrub params for sensistive data Jan 7, 2015
handler.go Fix HTTP POST error handling and correct typos Nov 26, 2013

README

Config
======

set airbrake.Endpoint and airbrake.ApiKey globals

Methods
=======

airbrake.Error(err) reports an error

airbrake.RequestError(err, *http.Request) can be used to add more context if you are in a http context


You can also automatically have this library report panics, use this method:

airbrake.CapturePanic(*http.Request)


example:

  func serve(w http.ResponseWriter, r *http.Request) {
      defer airbrake.CapturePanic(r)
      
      [...]

      panic("Oh no :-(") // will be recorded by airbrake 

  }
Something went wrong with that request. Please try again.