sentry

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package sentry wraps the Sentry Go SDK. All functions are no-ops when DSN is empty so the package is safe to call unconditionally regardless of whether Sentry is configured.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureException

func CaptureException(err error)

CaptureException sends err to Sentry. No-op if err is nil or Sentry is not configured.

func Flush

func Flush(timeout time.Duration)

Flush waits up to timeout for buffered events to be sent. No-op if Sentry is not configured.

func Init

func Init(dsn, environment, release string)

Init initializes the Sentry SDK. Does nothing if dsn is empty. If the DSN is invalid, initialization is skipped silently.

func StartSpan

func StartSpan(ctx context.Context, op, description string) func()

StartSpan starts a Sentry performance span attached to ctx. Returns a function that must be called to finish the span. If Sentry is not configured, returns a no-op finish function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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