sentryx

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 5 Imported by: 0

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

func Flush(timeout time.Duration)

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL