Documentation
¶
Index ¶
- Variables
- func CapturePanic(r *http.Request)
- func Error(err error) error
- func New(err error) *bugsnagEvent
- func NewWithSkipFrames(err error, skipFrames int) *bugsnagEvent
- func Notify(err error) error
- func NotifyRequest(err error, r *http.Request) error
- func OnCapturePanic(r *http.Request, handler func(event EventDescriber))
- type EventDescriber
Constants ¶
This section is empty.
Variables ¶
View Source
var ( APIKey string AppVersion string OSVersion string Hostname string WorkingDir string ReleaseStage = "production" NotifyReleaseStages = []string{ReleaseStage} AutoNotify = true UseSSL = true Verbose = false Notifier = &bugsnagNotifier{ Name: "Bugsnag Go client", Version: "0.0.2", URL: "https://github.com/toggl/bugsnag_client", } )
Functions ¶
func CapturePanic ¶
CapturePanic reports panics happening while processing a HTTP request
func New ¶
func New(err error) *bugsnagEvent
New returns returns a bugsnag event instance, that can be further configured before sending it.
func NewWithSkipFrames ¶
New returns returns a bugsnag event instance, that can be further configured before sending it.
func NotifyRequest ¶
NotifyRequest sends an error to bugsnag, and sets request URL as the event context.
func OnCapturePanic ¶
func OnCapturePanic(r *http.Request, handler func(event EventDescriber))
OnCapturePanic allows to set bugsnag variables before the error is sent off after a HTTP request handler panicked.
Types ¶
type EventDescriber ¶
type EventDescriber interface {
WithUserID(userID string) *bugsnagEvent
WithContext(context string) *bugsnagEvent
WithMetaDataValues(tab string, values map[string]interface{}) *bugsnagEvent
WithMetaData(tab string, name string, value interface{}) *bugsnagEvent
}
EventDescriber is the public interface of a bugsnag event
Click to show internal directories.
Click to hide internal directories.