sentry

package
v1.24.21 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureException

func CaptureException(err error)

func Enabled

func Enabled() bool

func Recover

func Recover(err any)

Types

type ConfigOpts

type ConfigOpts struct {
	Enabled bool              `json:"enabled" yaml:"enabled"`
	DSN     string            `json:"dsn" yaml:"dsn"`
	Debug   bool              `json:"debug" yaml:"debug"`
	Tags    map[string]string `json:"tags" yaml:"tags"`
}

ConfigOpts all map to environment variables. For example:

  • SENTRY_ENABLED=true -> ConfigOpts.Enabled=true
var Config *ConfigOpts

Config Global Singleton that can be accessed from anywhere in the app. This is required because panic recovery can happen anywhere in the app.

func InitSentryConfig

func InitSentryConfig() (*ConfigOpts, error)

InitSentryConfig from environment. Errors if called more than once.

Jump to

Keyboard shortcuts

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