Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureException ¶
func CaptureException(err error)
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"`
Release string `json:"release" yaml:"release"`
Environment string `json:"environment" yaml:"environment"`
ErrorReportingDisabled bool `json:"error_reporting_disabled" yaml:"error_reporting_disabled"`
TracingDisabled bool `json:"tracing_disabled" yaml:"tracing_disabled"`
ProfilingDisabled bool `json:"profiling_disabled" yaml:"profiling_disabled"`
ErrorSampleRate float64 `json:"error_sample_rate" yaml:"error_sample_rate"`
TracesSampleRate float64 `json:"traces_sample_rate" yaml:"traces_sample_rate"`
ProfileSampleRate float64 `json:"profile_sample_rate" yaml:"profile_sample_rate"`
ClusterId string `json:"cluster_id" yaml:"cluster_id"`
ClusterOwner string `json:"cluster_owner" yaml:"cluster_owner"`
}
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.
Click to show internal directories.
Click to hide internal directories.