Documentation ¶
Index ¶
- func Error(err error, tags map[string]string)
- func Fatal(err error, tags map[string]string)
- func Handler(h http.Handler) http.Handler
- func Info(message string, tags map[string]string)
- func RegisterErrorTracker(errTracker ErrorTracker)
- func Timing(name string, timing time.Duration, tags map[string]string)
- type ErrorTracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Error ¶
Error logs an error and optional metadata to console and to any registered ErrorTracker
func Fatal ¶
Fatal logs an error and optional metadata to console and to any registered ErrorTracker It will then panic.
func RegisterErrorTracker ¶
func RegisterErrorTracker(errTracker ErrorTracker)
RegisterErrorTracker registers an error tracker which is called when errors are raised
Types ¶
type ErrorTracker ¶
type ErrorTracker interface { Name() string TrackError(err error, tags map[string]string) TrackFatal(err error, tags map[string]string) }
ErrorTracker logs errors to an external service
func NewSentryErrorTracker ¶
func NewSentryErrorTracker(dsn string) (ErrorTracker, error)
NewSentryErrorTracker returns an ErrorTracker backed by Sentry
Click to show internal directories.
Click to hide internal directories.