Documentation
¶
Overview ¶
Package sentryx wraps github.com/getsentry/sentry-go with configuration from config so the rest of the service doesn't need to know about Sentry's surface area.
Settings are loaded via config.GetConfig().Sentry (or config.Setup). SENTRY_DSN being empty is the explicit "Sentry is off" signal — Init becomes a no-op and Flush returns immediately.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Flush ¶
Flush drains any buffered events. Safe to call when Sentry was never initialised (returns immediately). Use defer sentryx.Flush(cfg.FlushTimeout) right after Init so SIGTERM doesn't drop the panic that caused the shutdown.
func Init ¶
func Init(cfg config.SentryConfiguration) bool
Init configures the global Sentry hub. Returning a boolean (enabled) instead of an error keeps the caller simple — when DSN is empty we report "off" and proceed silently, when DSN is set but invalid Sentry's own Init returns an error which we log and treat as "off" (the service must keep running either way).
func LoadConfig ¶
func LoadConfig() config.SentryConfiguration
LoadConfig returns Sentry settings from the global config package.
Types ¶
This section is empty.