notifier

package
v0.0.0-...-045890f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close closes inited notifiers

func GetTraceId

func GetTraceId(ctx context.Context) string

GetTraceId fetches traceID from context

func InitAirbrake

func InitAirbrake(projectID int64, projectKey string)

InitAirbrake inits airbrake configuration

func InitBugsnag

func InitBugsnag(config bugsnag.Configuration)

InitBugsnag inits bugsnag configuration

func InitRollbar

func InitRollbar(token, env string)

InitRollbar inits rollbar configuration

func InitSentry

func InitSentry(dsn string)

InitSentry inits sentry (go-raven)

func Notify

func Notify(err error, rawData ...interface{}) error

Notify sends error info to the inited notifier

func NotifyOnPanic

func NotifyOnPanic(rawData ...interface{})

NotifyOnPanic notifies about a panic

func NotifyWithExclude

func NotifyWithExclude(err error, rawData ...interface{}) error

func NotifyWithLevel

func NotifyWithLevel(err error, level string, rawData ...interface{}) error

NotifyWithLevel sends error info to the inited notifier with a specific error level

func NotifyWithLevelAndSkip

func NotifyWithLevelAndSkip(err error, skip int, level string, rawData ...interface{}) error

NotifyWithLevelAndSkip sends error info to the inited notifier with a specific error level and skips number of stack frames

func SetEnvironemnt

func SetEnvironemnt(env string)

SetEnvironemnt sets the current environment to be reported

func SetHostname

func SetHostname(name string)

SetHostname sets the hostname to be used

func SetServerRoot

func SetServerRoot(path string)

SetServerRoot sets the server root

func SetTraceId

func SetTraceId(ctx context.Context) context.Context

SetTraceId updates the traceID based on context values

func UpdateTraceId

func UpdateTraceId(ctx context.Context, traceID string) context.Context

UpdateTraceId force updates the traced id to provided id

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL