Documentation ¶
Overview ¶
Package sentryutil contains utilities for functions for working with Sentry.
Index ¶
Constants ¶
const DSNEnv = "SENTRY_DSN"
DSNEnv is the name of the environment variable for the Sentry DSN.
const DefaultLoggerPrefix = "sentry_default_hub"
DefaultLoggerPrefix is the default prefix for the debug logger set in SetDefaultLogger.
Variables ¶
This section is empty.
Functions ¶
func InitDefaultHub ¶
InitDefaultHub initializes the default Sentry hub. It returns an error if DSNEnv isn't set in the environment.
func MustInitDefaultHub ¶
func MustInitDefaultHub(release string)
MustInitDefaultHub is like InitDefaultHub but panics on errors. This function should be used in a main function.
func ReportPanics ¶
func ReportPanics()
ReportPanics reports all panics using the default Sentry hub and repanics. This function should be used in a main function, after the default Sentry hub has been configured. It should be called in a defer.
func SetDefaultLogger ¶
SetDefaultLogger sets the default Sentry logger to l with prefix p and level debug. If p is empty, DefaultLoggerPrefix is used.
Types ¶
This section is empty.