diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2018-04-06 11:05:13 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2018-04-06 11:05:13 +0300 |
commit | 9cdc61b4369349fc875fa26a778549fcd2b744ea (patch) | |
tree | bafcebf21b05aea6e2cbc8f30b7b1714ac7e6be6 | |
parent | 7dd226834a44f7ecfc13bfe607126827a2df800d (diff) |
Send gitaly-ruby exceptions to their own DSN
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | config.toml.example | 4 | ||||
-rw-r--r-- | doc/configuration/README.md | 8 | ||||
-rw-r--r-- | internal/config/config.go | 5 | ||||
-rw-r--r-- | internal/rubyserver/rubyserver.go | 2 |
5 files changed, 17 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index a1b2bbcf3..05465335c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ UNRELEASED +- Send gitaly-ruby exceptions to their own DSN + https://gitlab.com/gitlab-org/gitaly/merge_requests/656 - Implement Get{Tag,Commit}Messages RPCs https://gitlab.com/gitlab-org/gitaly/merge_requests/646 - Fix directory permission walker for Go 1.10 diff --git a/config.toml.example b/config.toml.example index 113a22232..76b708c1a 100644 --- a/config.toml.example +++ b/config.toml.example @@ -31,8 +31,10 @@ path = "/home/git/repositories" # # You can optionally configure Gitaly to output JSON-formatted log messages to stdout # [logging] # format = "json" -# # Additionally exceptions from the Go server and gitaly-ruby can be reported to Sentry +# # Additionally exceptions from the Go server can be reported to Sentry # sentry_dsn = "https://<key>:<secret>@sentry.io/<project>" +# # Exceptions from gitaly-ruby can also be reported to Sentry +# ruby_sentry_dsn = "https://<key>:<secret>@sentry.io/<project>" # # You can optionally configure Gitaly to record histogram latencies on GRPC method calls # [prometheus] diff --git a/doc/configuration/README.md b/doc/configuration/README.md index 8dae81773..f9dce0b5d 100644 --- a/doc/configuration/README.md +++ b/doc/configuration/README.md @@ -112,6 +112,14 @@ max\_rss limit. |restart_delay|string|no|Time memory must be high before a restart is triggered, in seconds. Default 5 minutes ("5m").| |num_workers|integer|no|Number of gitaly-ruby worker processes. Default 2, minimum 2.| +### Logging + +|name|type|required|notes| +|----|----|--------|-----| +|format|string|no|Log format: "text" or "json". Default: "text"| +|sentry_dsn|string|no|Sentry DSN for exception monitoring| +|ruby_sentry_dsn|string|no|Sentry DSN for gitaly-ruby exception monitoring| + ## Environment variables ### GITALY_DEBUG diff --git a/internal/config/config.go b/internal/config/config.go index a3d9fb2e8..ae9c156d7 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -51,8 +51,9 @@ type Storage struct { // Logging contains the logging configuration for Gitaly type Logging struct { - Format string - SentryDSN string `toml:"sentry_dsn"` + Format string + SentryDSN string `toml:"sentry_dsn"` + RubySentryDSN string `toml:"ruby_sentry_dsn"` } // Prometheus contains additional configuration data for prometheus diff --git a/internal/rubyserver/rubyserver.go b/internal/rubyserver/rubyserver.go index b05b8ca89..779bb00bb 100644 --- a/internal/rubyserver/rubyserver.go +++ b/internal/rubyserver/rubyserver.go @@ -109,7 +109,7 @@ func Start() (*Server, error) { "GITALY_RUBY_GITALY_BIN_DIR="+cfg.BinDir, "GITALY_VERSION="+version.GetVersion(), ) - if dsn := cfg.Logging.SentryDSN; dsn != "" { + if dsn := cfg.Logging.RubySentryDSN; dsn != "" { env = append(env, "SENTRY_DSN="+dsn) } |