Documentation ¶
Overview ¶
Package clsentry provides Sentry error reporting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFlushFailed = errors.New("failed to flush sentry hub")
ErrFlushFailed is returned when the flush fails during fx shutdown.
Functions ¶
func StringFromEventID ¶ added in v0.32.9
StringFromEventID converts a sentry event ID to a string pointer.
func TestProvide ¶ added in v0.32.8
TestProvide provides dependencies in a way that makes testing Sentry integration easier.
Types ¶
type BeforeSendFunc ¶ added in v0.32.5
BeforeSendFunc allows events to be modified before they are sent to Sentry.
type Config ¶
type Config struct { // Sentry DSN to send data to. DSN string `env:"DSN"` // TracesSampleRate is the rate at which traces are captures for Sentry. TracesSampleRate float64 `env:"TRACES_SAMPLE_RATE" envDefault:"1.0"` // DefaultFlushTimeout is the default timeout for flushing to Sentry. DefaultFlushTimeout time.Duration `env:"DEFAULT_FLUSH_TIMEOUT" envDefault:"2s"` // AttachStacktrace is whether to attach stacktrace to pure capture message calls. AttachStacktrace bool `env:"ATTACH_STACKTRACE" envDefault:"true"` // If set, will add this environment to the Sentry scope. Environment string `env:"ENVIRONMENT" envDefault:"development"` }
Config configures.
type ObservedEvents ¶ added in v0.32.8
type ObservedEvents struct {
// contains filtered or unexported fields
}
ObservedEvents keeps observe logs.
func (*ObservedEvents) Events ¶ added in v0.32.8
func (o *ObservedEvents) Events() (evs []sentry.Event)
Events returns a copy of all the ovserved events. It is safe to call from multiple goroutines.
Click to show internal directories.
Click to hide internal directories.