Documentation ¶
Index ¶
- func SetLogger(l *log.Logger)
- type Error
- type Notice
- type Notifier
- func (n *Notifier) AddFilter(fn filter)
- func (n *Notifier) Close() error
- func (n *Notifier) CloseTimeout(timeout time.Duration) error
- func (n *Notifier) Flush()
- func (n *Notifier) Notice(err interface{}, req *http.Request, depth int) *Notice
- func (n *Notifier) Notify(e interface{}, req *http.Request)
- func (n *Notifier) NotifyOnPanic()
- func (n *Notifier) SendNotice(notice *Notice) (string, error)
- func (n *Notifier) SendNoticeAsync(notice *Notice)
- func (n *Notifier) SetHost(h string)
- func (n *Notifier) WaitAndClose(timeout time.Duration) error
- type StackFrame
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error struct { Type string `json:"type"` Message string `json:"message"` Backtrace []StackFrame `json:"backtrace"` }
type Notice ¶
type Notifier ¶
type Notifier struct { // http.Client that is used to interact with Airbrake API. Client *http.Client // contains filtered or unexported fields }
func NewNotifier ¶
func (*Notifier) AddFilter ¶
func (n *Notifier) AddFilter(fn filter)
AddFilter adds filter that can modify or ignore notice.
func (*Notifier) CloseTimeout ¶
CloseTimeout waits for pending requests to finish and then closes the notifier.
func (*Notifier) Notice ¶
Notice returns Aibrake notice created from error and request. depth determines which call frame to use when constructing backtrace.
func (*Notifier) NotifyOnPanic ¶
func (n *Notifier) NotifyOnPanic()
NotifyOnPanic notifies Airbrake about the panic and should be used with defer statement.
func (*Notifier) SendNotice ¶
SendNotice sends notice to Airbrake.
func (*Notifier) SendNoticeAsync ¶
SendNoticeAsync acts as SendNotice, but sends notice asynchronously and pending notices can be flushed with Flush.
func (*Notifier) SetHost ¶
Sets Airbrake host name. Default is https://airbrake.io.
type StackFrame ¶
Click to show internal directories.
Click to hide internal directories.