Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gin-contrib/sentry
Middleware to integrate with sentry crash reporting.
https://github.com/gin-contrib/sentry
crash-report crash-reporting gin-middleware sentry
Last synced: 2 months ago
JSON representation
Middleware to integrate with sentry crash reporting.
- Host: GitHub
- URL: https://github.com/gin-contrib/sentry
- Owner: gin-contrib
- License: mit
- Archived: true
- Created: 2017-01-13T01:16:10.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-19T14:20:47.000Z (about 5 years ago)
- Last Synced: 2024-04-14T09:59:03.440Z (10 months ago)
- Topics: crash-report, crash-reporting, gin-middleware, sentry
- Language: Go
- Size: 14.6 KB
- Stars: 61
- Watchers: 10
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gin - gin-contrib/sentry
README
# sentry
[![Build Status](https://travis-ci.org/gin-contrib/sentry.svg?branch=master)](https://travis-ci.org/gin-contrib/sentry)
[![Go Report Card](https://goreportcard.com/badge/github.com/gin-contrib/sentry)](https://goreportcard.com/report/github.com/gin-contrib/sentry)
[![GoDoc](https://godoc.org/github.com/gin-contrib/sentry?status.svg)](https://godoc.org/github.com/gin-contrib/sentry)
[![Join the chat at https://gitter.im/gin-gonic/gin](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gin-gonic/gin)---
> The `sentry` middleware is no longer maintained and was superseded by the `sentry-go` SDK.
> Learn more about the project on [GitHub](https://github.com/getsentry/sentry-go) and check out the new [gin middleware](https://github.com/getsentry/sentry-go/tree/master/gin).---
## Example
See the [example](example/main.go)
[embedmd]:# (example/main.go go)
```go
package mainimport (
"github.com/getsentry/raven-go"
"github.com/gin-contrib/sentry"
"github.com/gin-gonic/gin"
)func init() {
raven.SetDSN("https://:@app.getsentry.com/")
}func main() {
r := gin.Default()
r.Use(sentry.Recovery(raven.DefaultClient, false))
// only send crash reporting
// r.Use(sentry.Recovery(raven.DefaultClient, true))
r.Run(":8080")
}
```