sentryfiberv3

package module
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 6 Imported by: 0

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

func CaptureError(c fiber.Ctx, err error)

CaptureError reports err against the current request's Sentry hub. No-op when err is nil or Sentry is disabled.

func New

func New() fiber.Handler

New returns the middleware with default Config.

func NewWithConfig

func NewWithConfig(cfg Config) fiber.Handler

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.

Jump to

Keyboard shortcuts

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