Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SentryDSN string `mapstructure:"dsn"` // contains filtered or unexported fields }
Config stores the configuration for the tracking.
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook is a service hook for the Logrus logger.
It's used for sending errors and messages to Sentry on specific log levels. It wraps a default Sentry client.
func NewSentryHook ¶
NewSentryHook creates a hook to be added to an instance of logger and initializes Sentry in package level. SentryHook will be triggered on Panic, Fatal and Error levels.
func (*Hook) AddTag ¶
AddTag add a pair (key, value) in the map of tags attached to every Sentry Event handled by this hook.
func (*Hook) Fire ¶
Fire uses the configured Sentry client to report the given Logrus Entry as Sentry Event.
func (*Hook) Levels ¶
Levels returns the list of Logrus levels for which this hook is configured to report errors.
func (*Hook) SetEnvironment ¶
SetEnvironment sets the environment that every Sentry Event handled by this hook refers to.
func (*Hook) SetRelease ¶
SetRelease sets the release that every Sentry Event handled by this hook refers to.