Documentation ¶
Index ¶
- Variables
- type Sentry
- func (wrapper *Sentry) Capture(err error, _panic bool) sentry.EventID
- func (wrapper *Sentry) CaptureWithContext(c context.Context, err error, _panic bool) sentry.EventID
- func (wrapper *Sentry) HandleFunc(handler http.HandlerFunc) http.HandlerFunc
- func (wrapper *Sentry) HandleHttpRouter(handler httprouter.Handle) httprouter.Handle
- func (wrapper *Sentry) SentryMiddleware(next http.Handler) http.Handler
- func (wrapper *Sentry) StreamServerInterceptor() grpc.StreamServerInterceptor
- func (wrapper *Sentry) UnaryServerInterceptor() grpc.UnaryServerInterceptor
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SentryClient = InitSentry("")
)
Functions ¶
This section is empty.
Types ¶
type Sentry ¶
type Sentry struct {
// contains filtered or unexported fields
}
func InitSentry ¶
func (*Sentry) CaptureWithContext ¶
Handles an error by capturing it on Sentry and logging the same on STDOUT
func (*Sentry) HandleFunc ¶
func (wrapper *Sentry) HandleFunc(handler http.HandlerFunc) http.HandlerFunc
Wrapper over sentry-go/http#HandleFunc Only calls the sentry handler if sentry was successfully initialized
func (*Sentry) HandleHttpRouter ¶
func (wrapper *Sentry) HandleHttpRouter(handler httprouter.Handle) httprouter.Handle
Wrapper over sentry-go/http#HandleFunc Only calls the sentry handler if sentry was successfully initialized
func (*Sentry) SentryMiddleware ¶
SentryMiddleware use directly with mux returns http.Handler to directly use with router
func (*Sentry) StreamServerInterceptor ¶
func (wrapper *Sentry) StreamServerInterceptor() grpc.StreamServerInterceptor
StreamServerInterceptor returns a grpc interceptor that reports errors and panics to sentry. It also sets *sentry.Hub to context.
func (*Sentry) UnaryServerInterceptor ¶
func (wrapper *Sentry) UnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor is a grpc interceptor that reports errors and panics to sentry. It also sets *sentry.Hub to context.
Click to show internal directories.
Click to hide internal directories.