hanayo/vendor/github.com/gin-gonic/contrib/sentry
2019-02-23 13:29:15 +00:00
..
README.md replace zxq.co/ripple/hanayo 2019-02-23 13:29:15 +00:00
recovery.go replace zxq.co/ripple/hanayo 2019-02-23 13:29:15 +00:00

sentry

Middleware to integrate with sentry crash reporting. Middleware version of raven.RecoveryHandler().

EOL-warning

This package has been abandoned on 2017-01-13. Please use gin-contrib/sentry instead.

Example

package main

import (
  "github.com/getsentry/raven-go"
  "github.com/gin-gonic/contrib/sentry"
  "github.com/gin-gonic/gin"
)

func init() {
  raven.SetDSN("https://<key>:<secret>@app.getsentry.com/<project>")
}

func main() {
  r := gin.Default()
  r.Use(sentry.Recovery(raven.DefaultClient, false))
  // ...
  r.Run(":8080")
}