Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ApiKey = "" Endpoint = "https://api.airbrake.io/notifier_api/v2/notices" Environment = "development" Verbose = false // PrettyParams allows including request query/form parameters on the Environment tab // which is more readable than the raw text of the Parameters tab (in Errbit). // The param keys will be rendered as "?<param>" so they will sort together at the top of the tab. PrettyParams = false // RootPackage enables rendering of the backtrace with hyperlinks to the repository. // If set to the name of the root package of the project, e.g. github.com/user/project, // any file paths in the backtrace that contain that string will be converted // to the `[PROJECT_ROOT]/...` form, which triggers the hyperlinking in errbit. // This feature also requires the APP to have its Repository configured in errbit. RootPackage = "" // AppVersion determines which commit will be used for backtrace hyperlinks. // If unset, errbit defaults to `master`. For github it should be a branch name // or a commit hash. // One way to record the corresponding commit hash in a compiled binary // is to use the -X linker flag. (see https://golang.org/cmd/ld) AppVersion = "" )
Functions ¶
func CapturePanic ¶
func CapturePanicHandler ¶
func CapturePanicHandler(app http.HandlerFunc) http.HandlerFunc
CapturePanicHandler "middleware". Wraps the http handler so that all panics will be dutifully reported to airbrake
Example:
http.HandleFunc("/", airbrake.CapturePanicHandler(MyServerFunc))
Types ¶
Click to show internal directories.
Click to hide internal directories.