apperrors

package
v0.0.0-...-9200811 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2018 License: AGPL-3.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapLogWithTracker

func WrapLogWithTracker(log logutil.Log, lctx logutil.Context, t Tracker) logutil.Log

Types

type Level

type Level string
const (
	LevelError Level = "ERROR"
	LevelWarn  Level = "WARN"
)

type NopTracker

type NopTracker struct{}

func NewNopTracker

func NewNopTracker() *NopTracker

func (NopTracker) Track

func (t NopTracker) Track(level Level, errorText string, ctx map[string]interface{})

func (NopTracker) WithHTTPRequest

func (t NopTracker) WithHTTPRequest(r *http.Request) Tracker

type RollbarTracker

type RollbarTracker struct {
	// contains filtered or unexported fields
}

func NewRollbarTracker

func NewRollbarTracker(token, project, env string) *RollbarTracker

func (RollbarTracker) Track

func (t RollbarTracker) Track(level Level, errorText string, ctx map[string]interface{})

func (RollbarTracker) WithHTTPRequest

func (t RollbarTracker) WithHTTPRequest(r *http.Request) Tracker

type SentryTracker

type SentryTracker struct {
	// contains filtered or unexported fields
}

func NewSentryTracker

func NewSentryTracker(dsn, env string) (*SentryTracker, error)

func (SentryTracker) Track

func (t SentryTracker) Track(level Level, errorText string, ctx map[string]interface{})

func (SentryTracker) WithHTTPRequest

func (t SentryTracker) WithHTTPRequest(r *http.Request) Tracker

type Tracker

type Tracker interface {
	Track(level Level, errorText string, ctx map[string]interface{})
	WithHTTPRequest(r *http.Request) Tracker
}

func GetTracker

func GetTracker(cfg config.Config, log logutil.Log, project string) Tracker

Jump to

Keyboard shortcuts

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