https://github.com/mtchavez/gosentry
Go Package for Sentry
https://github.com/mtchavez/gosentry
Last synced: about 2 months ago
JSON representation
Go Package for Sentry
- Host: GitHub
- URL: https://github.com/mtchavez/gosentry
- Owner: mtchavez
- Created: 2013-09-30T16:19:38.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-05T18:51:44.000Z (over 11 years ago)
- Last Synced: 2025-02-04T15:32:45.599Z (4 months ago)
- Language: Go
- Homepage: http://godoc.org/github.com/mtchavez/gosentry
- Size: 1.49 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go Sentry
Go package for [sentry](http://app.getsentry.com)
## Install
Run `go get -u github.com/mtchavez/gosentry`
## Usage
Set up a `RavenConfig` with your Project DSN
```go
package mainimport (
sentry "githubcom/mtchavez/gosentry"
)var Raven *sentry.RavenConfig
func main() {
var err
myDSN := ""http://username:[email protected]/{project_id}"
Raven, err = sentry.Setup(myDSN)
if err != nil {
println(err.Error())
}
}
```Capture a panic and sent error to sentry
```go
func myFunc() {
defer func() {
if r := recover(); r != nil {
Raven.Message(r, "in package.myFunc()")
}
}()}
```## TODO
* Beef up tests
* Need to get backtrace to show up
* Add go examples
* Clean up code