negroniraven

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SentryTags are the tags provided to each sentry client and are applied to
	// each packet sent to sentry
	SentryTags = map[string]string{
		"level":    "panic",
		"logger":   "root",
		"dyno":     os.Getenv("DYNO"),
		"hostname": os.Getenv("HOSTNAME"),
	}
)

Functions

func SendRavenPacket

func SendRavenPacket(packet *raven.Packet, cl *raven.Client, log *logrus.Logger, tags map[string]string) error

SendRavenPacket encapsulates the raven packet send, plus logging around errors and such

Types

type Middleware

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

func NewMiddleware

func NewMiddleware(sentryDSN, environment string) (*Middleware, error)

func (*Middleware) ServeHTTP

func (mw *Middleware) ServeHTTP(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)

Jump to

Keyboard shortcuts

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