feat: capture logged errors and forward them to sentry when enabled
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
This commit is contained in:
@ -34,6 +34,10 @@ func SetupSentry(ctx context.Context, conf config.SentryConfig, release string)
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
logger.SetCaptureFunc(func(err error) {
|
||||
sentry.CaptureException(err)
|
||||
})
|
||||
|
||||
flush := func() {
|
||||
sentry.Flush(time.Duration(*conf.FlushTimeout))
|
||||
}
|
||||
|
Reference in New Issue
Block a user