Commit e1a1bfc4 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Custome Sentry DSN environment variable

parent e3fc2af7
......@@ -76,6 +76,12 @@ make install PREFIX=/foo
On some operating systems, such as FreeBSD, you may have to use
`gmake` instead of `make`.
## Error tracking
GitLab-Workhorse supports remote error tracking with
[Sentry](https://sentry.io). To enable this feature set the
GITLAB_WORKHORSE_SENTRY_DSN environment variable.
## Tests
Run the tests with:
......
......@@ -106,5 +106,9 @@ func main() {
}
func wrapRaven(h http.Handler) http.Handler {
// Use a custom environment variable (not SENTRY_DSN) to prevent
// clashes with gitlab-rails.
raven.SetDSN(os.Getenv("GITLAB_WORKHORSE_SENTRY_DSN"))
return http.HandlerFunc(raven.RecoveryHandler(h.ServeHTTP))
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment