airbrake-go – github.com/tobi/airbrake-go Index | Files

package airbrake

import "github.com/tobi/airbrake-go"

Index

Variables

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
)

Functions

func CapturePanic

func CapturePanic(r *http.Request)

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))

func Error

func Error(e error, request *http.Request) error

func Notify

func Notify(e error) error

Types

type Line

type Line struct {
	Function string
	File     string
	Line     int
}

Source Files

airbrake.go handler.go

Version
v0.0.0-20151005181455-a3cdd910a3ff (latest)
Published
Oct 5, 2015
Platform
js/wasm
Imports
14 packages
Last checked
1 week ago

Tools for package owners.