xlog-sentry is an xlog to Sentry output for github.com/rs/xlog.
go get github.com/trong/xlog-sentry
o := xlogsentry.NewSentryOutput(YOUR_DSN, nil)
o.Timeout = 300 * time.Millisecond
o.StacktraceConfiguration.Enable = true
l := xlog.New(xlog.Config{
Output: o,
Fields: xlog.F{
"role": "my-service",
},
})
l.Errorf("What: %s", "happens?")
All source code is licensed under the MIT License.