Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOptions ¶ added in v0.3.18
func BuildOptions(ff ...Option) options
func ReportAlways ¶ added in v0.3.18
ReportAlways returns true if err is non-nil.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func New ¶
func New(options sentryhttp.Options) *Handler
New returns a struct that provides Handle and HandleFunc methods that satisfy http.Handler and http.HandlerFunc interfaces.
func (*Handler) HandleFunc ¶
func (h *Handler) HandleFunc(handler http.HandlerFunc) http.HandlerFunc
HandleFunc wraps http.HandleFunc and recovers from caught panics.
func (*Handler) HandleHttpRouter ¶
func (h *Handler) HandleHttpRouter(handler httprouter.Handle) httprouter.Handle
HandleFunc wraps http.HandleFunc and recovers from caught panics.
type Option ¶ added in v0.3.18
type Option func(*options)
Option configures reporting behavior.
func WithRepanic ¶ added in v0.3.18
WithRepanic configures whether to panic again after recovering from a panic. Use this option if you have other panic handlers.
func WithReportOn ¶ added in v0.3.18
WithReportOn configures whether to report on errors.
type ReportOn ¶ added in v0.3.18
ReportOn decides error should be reported to sentry.
func ReportOnCodes ¶ added in v0.3.18
ReportOnCodes returns true if error code matches on of the given codes.
type WrappedServerStream ¶ added in v0.3.18
type WrappedServerStream struct { grpc.ServerStream // WrappedContext is the wrapper's own Context. You can assign it. WrappedContext context.Context }
WrappedServerStream is a thin wrapper around grpc.ServerStream that allows modifying context.
func WrapServerStream ¶ added in v0.3.18
func WrapServerStream(stream grpc.ServerStream) *WrappedServerStream
WrapServerStream returns a ServerStream that has the ability to overwrite context.
func (*WrappedServerStream) Context ¶ added in v0.3.18
func (w *WrappedServerStream) Context() context.Context
Context returns the wrapper's WrappedContext, overwriting the nested grpc.ServerStream.Context()