Documentation
¶
Overview ¶
Package sentry provides helpers for logging errors to sentry from sdk primitives like the logger.
Index ¶
Constants ¶
View Source
const ( Platform = "go" SDK = "sentry.go" )
Constants
View Source
const (
// ListenerName is the sentry listener name.
ListenerName = "sentry"
)
Variables ¶
This section is empty.
Functions ¶
func AddListeners ¶
func AddListeners(log logger.Listenable, cfg Config)
AddListeners adds error listeners.
func GetFingerprint ¶
GetFingerprint gets a context specific fingerprint from the context. You can set this with `WithFingerprint(...)`. It will override the default behavior of setting the fingerprint to the logger path + err.Error().
Types ¶
type Config ¶
type Config struct { // The DSN to use. If the DSN is not set, the client is effectively disabled. DSN string `json:"dsn" yaml:"dsn"` // The server name to be reported. ServerName string `json:"serverName" yaml:"serverName"` // The dist to be sent with events. Dist string `json:"dist" yaml:"dist"` // The release to be sent with events. Release string `json:"release" yaml:"release"` // The environment to be sent with events. Environment string `json:"environment" yaml:"environment"` // Maximum number of breadcrumbs. MaxBreadcrumbs int `json:"maxBreadCrumbs" yaml:"maxBreadCrumbs"` }
Config is the sentry config.
func (*Config) GetDSNHost ¶ added in v1.20210103.1
GetDSNHost returns just the scheme and hostname for the dsn.
Click to show internal directories.
Click to hide internal directories.