// Critical creates an error level log event and sends the error to the
// remote error tracking service.
Critical creates an error level log event and sends the error to the
remote error tracking service.
// Critical creates an error level log event and sends the error to the // remote error tracking service .
func Critical(log zerolog.Logger, err error) *zerolog.Event {
	st := sentry.NewStacktrace()
	st.Frames = st.Frames[:len(st.Frames)-1]
	e := sentry.NewEvent()
	e.Level = sentry.LevelError
	e.Exception = []sentry.Exception{{
		Type:       err.Error(),
		Stacktrace: st,
	}}
	sentry.CaptureEvent(e)
	return log.Error().Err(errors.New("internal error"))
}
func Critical ( log zerolog . Logger , err error ) * zerolog . Event { st := sentry . NewStacktrace ( ) st . Frames = st . Frames [ : len ( st . Frames ) - 1 ] e := sentry . NewEvent ( ) e . Level = sentry . LevelError e . Exception = [ ] sentry . Exception { { Type : err . Error ( ) , Stacktrace : st , } } sentry . CaptureEvent ( e ) return log . Error ( ) . Err ( errors . New ( " " ) ) }
Critical creates an error level log event and sends the error to the
remote error tracking service.
Critical creates an error level log event and sends the error to the remote error tracking service .
// since critical errors might expose some of the internal logic, // they shouldn't be logged locally