Documentation ¶
Overview ¶
Package report can be used for reproting and alerting on errors using Rollbar.
Deprecated: this package has been frozen and deprecated in favor of github.com/moorara/observe/report
Index ¶
- func Error(err error)
- func ErrorWithMetadata(err error, metadata map[string]interface{})
- func HTTPError(req *http.Request, err error)
- func HTTPErrorWithMetadata(req *http.Request, err error, metadata map[string]interface{})
- func OnPanic()
- func SetOptions(opts RollbarOptions)
- func Wait()
- type RollbarOptions
- type RollbarReporter
- func (r *RollbarReporter) Error(err error)
- func (r *RollbarReporter) ErrorWithMetadata(err error, metadata map[string]interface{})
- func (r *RollbarReporter) HTTPError(req *http.Request, err error)
- func (r *RollbarReporter) HTTPErrorWithMetadata(req *http.Request, err error, metadata map[string]interface{})
- func (r *RollbarReporter) OnPanic()
- func (r *RollbarReporter) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorWithMetadata ¶
ErrorWithMetadata reports an error with extra metadata
func HTTPErrorWithMetadata ¶
HTTPErrorWithMetadata reports an error for an http request with extra metdata
func SetOptions ¶
func SetOptions(opts RollbarOptions)
SetOptions sets options for singleton reporter
Types ¶
type RollbarOptions ¶
type RollbarOptions struct { Token string Environment string CodeVersion string ProjectURL string // contains filtered or unexported fields }
RollbarOptions contains optional options for RollbarReporter
type RollbarReporter ¶
type RollbarReporter struct {
// contains filtered or unexported fields
}
RollbarReporter simplifies rollbar client
func NewRollbarReporter ¶
func NewRollbarReporter(opts RollbarOptions) *RollbarReporter
NewRollbarReporter creates a new instance of reporter
func (*RollbarReporter) ErrorWithMetadata ¶
func (r *RollbarReporter) ErrorWithMetadata(err error, metadata map[string]interface{})
ErrorWithMetadata reports an error with extra metadata
func (*RollbarReporter) HTTPError ¶
func (r *RollbarReporter) HTTPError(req *http.Request, err error)
HTTPError reports an error for an http request
func (*RollbarReporter) HTTPErrorWithMetadata ¶
func (r *RollbarReporter) HTTPErrorWithMetadata(req *http.Request, err error, metadata map[string]interface{})
HTTPErrorWithMetadata reports an error for an http request with extra metdata
func (*RollbarReporter) OnPanic ¶
func (r *RollbarReporter) OnPanic()
OnPanic reports a panic and should be used with defer
func (*RollbarReporter) Wait ¶ added in v0.2.6
func (r *RollbarReporter) Wait()
Wait blocks until all errors are reported