Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrQueueFull = errors.New("queue full - event dropped")
)
Functions ¶
func LogDropHandler ¶
func LogDropHandler(e *Event)
func Recoverer ¶
func Recoverer(c *Client, next http.HandlerFunc) http.HandlerFunc
Types ¶
type Airbrake ¶
type Airbrake struct {
// contains filtered or unexported fields
}
func NewAirbrake ¶
type AirbrakeContext ¶
type AirbrakeContext struct { OS string `json:"os,omitempty"` Language string `json:"language,omitempty"` Environment string `json:"environment,omitempty"` Version string `json:"version,omitempty"` URL string `json:"url,omitempty"` Action string `json:"action,omitempty"` RootDirectory string `json:"rootDirectory,omitempty"` UserID string `json:"userId,omitempty"` UserName string `json:"userName,omitempty"` UserEmail string `json:"userEmail,omitempty"` UserAgent string `json:"userAgent,omitempty"` }
type AirbrakeError ¶
type AirbrakeError struct { Type string `json:"type"` Message string `json:"message,omitempty"` Backtrace []*StacktraceFrame `json:"backtrace"` }
type AirbrakeNotification ¶
type AirbrakeNotification struct { Notifier notifier `json:"notifier"` Errors []AirbrakeError `json:"errors"` Context AirbrakeContext `json:"context,omitempty"` Environment map[string]string `json:"environment,omitempty"` Session map[string]string `json:"session,omitempty"` Params map[string]string `json:"params,omitempty"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) HTTPPanicWithCtx ¶
type Config ¶
func (*Config) SetDefaults ¶
func (c *Config) SetDefaults()
type Event ¶
type Event struct { Type string Context map[string]interface{} Stacktrace *Stacktrace }
type Http ¶
type Stacktrace ¶
type Stacktrace struct {
Frames []*StacktraceFrame `json:"frames"`
}
func NewStacktrace ¶
func NewStacktrace(skip int, context int, appPackagePrefixes []string) *Stacktrace
Intialize and populate a new stacktrace, skipping skip frames.
context is the number of surrounding lines that should be included for context. Setting context to 3 would try to get seven lines. Setting context to -1 returns one line with no surrounding context, and 0 returns no context.
appPackagePrefixes is a list of prefixes used to check whether a package should be considered "in app".
func (*Stacktrace) Culprit ¶
func (s *Stacktrace) Culprit() string
type StacktraceFrame ¶
type StacktraceFrame struct { // At least one required Filename string `json:"file"` Function string `json:"function"` Line int `json:"line"` Package string `json:"package"` // Optional ContextLine string PreContext []string PostContext []string InApp bool }
func NewStacktraceFrame ¶
func NewStacktraceFrame(pc uintptr, file string, line, context int, appPackagePrefixes []string) *StacktraceFrame
Build a single frame using data returned from runtime.Caller.
context is the number of surrounding lines that should be included for context. Setting context to 3 would try to get seven lines. Setting context to -1 returns one line with no surrounding context, and 0 returns no context.
appPackagePrefixes is a list of prefixes used to check whether a package should be considered "in app".