gofibersentry

package
v0.0.0-...-bd1f57a Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ContextKey = contextKey(1)

Variables

This section is empty.

Functions

func Convert

func Convert(ctx *fiber.Ctx) *http.Request

func SentryInit

func SentryInit()

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(options Options) *Handler

func (*Handler) Handle

func (h *Handler) Handle(ctx *fiber.Ctx) error

Handle wraps fasthttp.RequestHandler and recovers from caught panics.

func (*Handler) RecoverWithSentry

func (h *Handler) RecoverWithSentry(hub *sentry.Hub, ctx *fiber.Ctx)

type Options

type Options struct {
	// Repanic configures whether Sentry should repanic after recovery, in most cases it should be set to false,
	// as fasthttp doesn't include it's own Recovery handler.
	Repanic bool
	// WaitForDelivery configures whether you want to block the request before moving forward with the response.
	// Because fasthttp doesn't include it's own Recovery handler, it will restart the application,
	// and event won't be delivered otherwise.
	WaitForDelivery bool
	// Timeout for the event delivery requests.
	Timeout time.Duration
}

Jump to

Keyboard shortcuts

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