notifier

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 16 Imported by: 3

README

GoDoc

notifier

import "github.com/go-coldbrew/errors/notifier"

Index

func Close

func Close()

func GetTraceHeaderName

func GetTraceHeaderName() string

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 SetEnvironment

func SetEnvironment(env string)

func SetHostname

func SetHostname(name string)

func SetRelease

func SetRelease(rel string)

func SetServerRoot

func SetServerRoot(path string)

func SetTraceHeaderName

func SetTraceHeaderName(name 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

type Tags

type Tags map[string]string

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func GetTraceHeaderName

func GetTraceHeaderName() string

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 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 SetEnvironment

func SetEnvironment(env string)

func SetHostname

func SetHostname(name string)

func SetRelease

func SetRelease(rel string)

func SetServerRoot

func SetServerRoot(path string)

func SetTraceHeaderName

func SetTraceHeaderName(name 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