Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Latest commit

 

History

History
22 lines (16 loc) · 424 Bytes

readme.md

File metadata and controls

22 lines (16 loc) · 424 Bytes

sentroni

-- import "github.com/bradleyg/go-sentroni"

Recovery is a Negroni middleware that recovers from any panics, writes a 500 and passes the error to Sentry.

Usage:

n := negroni.New()
n.Use(sentroni.NewRecovery(sentryDsn))
n.Run()

Usage

func NewRecovery

func NewRecovery(dsn string) *recovery

NewRecovery returns a *http.Handler interface. Pass your Sentry dsn as an argument.