sentry

package
v0.0.0-...-90ece10 Latest Latest
Warning

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

Go to latest
Published: May 11, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SentryField = "sentry"
)

Variables

This section is empty.

Functions

func NewSentry

func NewSentry(interfaces ...raven.Interface) []raven.Interface

func WithException

func WithException(err error, stacktrace *raven.Stacktrace) *raven.Exception

func WithHttpRequest

func WithHttpRequest(request *http.Request) *raven.Http

func WithStacktrace

func WithStacktrace(skip int, context int, appPackagePrefixes []string) *raven.Stacktrace

func WithUser

func WithUser(id, username, email, ip string) *raven.User

Types

type Hook

type Hook struct {
	Async       bool
	SentryField string
	// contains filtered or unexported fields
}

func NewHook

func NewHook(dsn string, levels ...logrus.Level) *Hook

func (*Hook) AddTag

func (hook *Hook) AddTag(key, value string)

func (*Hook) Fire

func (hook *Hook) Fire(entry *logrus.Entry) error

func (*Hook) Levels

func (hook *Hook) Levels() []logrus.Level

func (*Hook) SetEnvironment

func (hook *Hook) SetEnvironment(environment string)

func (*Hook) SetRelease

func (hook *Hook) SetRelease(release string)

func (*Hook) SetTags

func (hook *Hook) SetTags(tags map[string]string)

Jump to

Keyboard shortcuts

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