surveillance

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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 InitSentry(release string) (client *Sentry)

func (*Sentry) Capture

func (wrapper *Sentry) Capture(err error, _panic bool) sentry.EventID

Handles an error by capturing it on Sentry and logging the same on STDOUT

func (*Sentry) CaptureWithContext

func (wrapper *Sentry) CaptureWithContext(c context.Context, err error, _panic bool) sentry.EventID

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

func (wrapper *Sentry) SentryMiddleware(next http.Handler) http.Handler

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL