Documentation
¶
Overview ¶
Package telemetry provides optional error tracking via Sentry.
Error tracking is completely optional and only enabled if SENTRY_DSN environment variable is set. When disabled, all functions are safe no-ops. This is designed for production use without requiring error tracking.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureError ¶
func CaptureError(err error)
CaptureError captures an error in Sentry at the default level if Sentry is initialized. Safe to call even if Sentry is not initialized (no-op in that case).
func CaptureException ¶
CaptureException captures an exception in Sentry with a specified severity level. Safe to call even if Sentry is not initialized (no-op in that case).
func Close ¶
func Close()
Close flushes any pending events to Sentry with a 2-second timeout. Safe to call even if Sentry is not initialized (no-op in that case). Should be called via defer in main().
func InitSentry ¶
func InitSentry() error
InitSentry initializes Sentry error tracking if SENTRY_DSN environment variable is set. If SENTRY_DSN is not set, this is a no-op. Returns an error only if initialization fails with a configured DSN (not if DSN is missing).
Types ¶
This section is empty.