Skip to content
代码片段 群组 项目
提交 e1a1bfc4 编辑于 作者: Jacob Vosmaer's avatar Jacob Vosmaer
浏览文件

Custome Sentry DSN environment variable

上级 e3fc2af7
No related branches found
No related tags found
无相关合并请求
...@@ -76,6 +76,12 @@ make install PREFIX=/foo ...@@ -76,6 +76,12 @@ make install PREFIX=/foo
On some operating systems, such as FreeBSD, you may have to use On some operating systems, such as FreeBSD, you may have to use
`gmake` instead of `make`. `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 ## Tests
Run the tests with: Run the tests with:
......
...@@ -106,5 +106,9 @@ func main() { ...@@ -106,5 +106,9 @@ func main() {
} }
func wrapRaven(h http.Handler) http.Handler { 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)) return http.HandlerFunc(raven.RecoveryHandler(h.ServeHTTP))
} }
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册