Documentation
¶
Overview ¶
Package sentryfiberv3 is the Fiber v3 adapter for the sentrycore Sentry error/crash reporting engine. See the sibling sentryfiber package for Fiber v2.
It mirrors sentryfiber: a per-request Sentry hub is bound to the request context, enriched with the HTTP request and the active APM trace tags (read via c.RequestCtx(), matching apmfiberv3), panics are recovered and reported, and errors bubbled from handlers are captured.
It never blocks the request: when Sentry is disabled (empty DSN) the middleware still calls c.Next() and every capture is a no-op.
Pitfall: place this middleware AFTER apmfiberv3.Middleware() so the APM transaction already exists on c.RequestCtx() when sentrycore reads the trace tags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureError ¶
CaptureError reports err against the current request's Sentry hub. No-op when err is nil or Sentry is disabled.
func NewWithConfig ¶
NewWithConfig returns the middleware configured by cfg.
Types ¶
type Config ¶
type Config struct {
Repanic bool
WaitForDelivery bool
// Redactor masks sensitive request headers and query params before they
// reach Sentry. Nil uses logcore.DefaultRedactor(); pass the same
// *logcore.Redactor given to logcore.Options.Redactor so a custom
// denylist reflects in both. setup.Builder wires this automatically.
Redactor *logcore.Redactor
}
Config tunes the middleware. See sentryfiber.Config for field meanings.