notifier

package
v2.0.0-...-1c13370 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ErrorLevel   = "error"
	DebugLevel   = "debug"
	InfoLevel    = "info"
	WarningLevel = "warning"
	FatalLevel   = "fatal"
)

Variables

This section is empty.

Functions

func Close

func Close()

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)

func Notify

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

func NotifyOnPanic

func NotifyOnPanic(rawData ...interface{})

func NotifyWithExclude

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

func NotifyWithLevel

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

func NotifyWithLevelAndSkip

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

func SetEnvironemnt

func SetEnvironemnt(env string)

func SetHostname

func SetHostname(name string)

func SetServerRoot

func SetServerRoot(path string)

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

type Tags

type Tags map[string]string

Jump to

Keyboard shortcuts

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