Documentation ¶
Overview ¶
Package sentry provides sentry functionality as a module.
Index ¶
- type Opt
- func WithAttachStacktrace(b bool) Opt
- func WithClientOptions(opt sentry.ClientOptions) Opt
- func WithDSN(dsn string) Opt
- func WithEnableTracing(b bool) Opt
- func WithIgnoreInitErr() Opt
- func WithSampleRate(rate float64) Opt
- func WithTracesSampleRate(rate float64) Opt
- func WithTracesSampler(ts sentry.TracesSampler) Opt
- type Sentry
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opt ¶
func WithAttachStacktrace ¶
func WithClientOptions ¶
func WithClientOptions(opt sentry.ClientOptions) Opt
func WithEnableTracing ¶
func WithIgnoreInitErr ¶
func WithIgnoreInitErr() Opt
WithIgnoreInitErr causes module to only log init errors instead of preventing the service to start.
func WithSampleRate ¶
func WithTracesSampleRate ¶
func WithTracesSampler ¶
func WithTracesSampler(ts sentry.TracesSampler) Opt
type Sentry ¶
type Sentry struct {
// contains filtered or unexported fields
}
func New ¶
New creates sentry module with given options.
Example ¶
package main import ( "fmt" "github.com/elisasre/go-common/service" "github.com/elisasre/go-common/service/module/sentry" ) func main() { s := sentry.New( sentry.WithDSN("some-dsn"), ) err := service.Run(service.Modules{s}) if err != nil { fmt.Println(err) } }
Output: failed to initialize module sentry.Sentry: [Sentry] DsnParseError: invalid scheme
Click to show internal directories.
Click to hide internal directories.