diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-12-05 21:54:40 +0100 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-12-06 20:46:14 +0100 |
commit | 39c1731a53d1014eab7c876d70632b1abf738712 (patch) | |
tree | 5d51a48a32a92fdedf7b907a32caa172d1c0d923 /lib/api/helpers.rb | |
parent | cfe484795d4ddb8c7b3247802547e3da74c64cf2 (diff) | |
download | gitlab-ce-39c1731a53d1014eab7c876d70632b1abf738712.tar.gz |
Log and pass correlation-id between Unicorn, Sidekiq and Gitaly
The Correlation ID is taken or generated from received X-Request-ID.
Then it is being passed to all executed services (sidekiq workers
or gitaly calls).
The Correlation ID is logged in all structured logs as `correlation_id`.
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 9fda73d5b92..2cceb2ec798 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -368,10 +368,10 @@ module API end def handle_api_exception(exception) - if sentry_enabled? && report_exception?(exception) + if report_exception?(exception) define_params_for_grape_middleware - sentry_context - Raven.capture_exception(exception, extra: params) + Gitlab::Sentry.context(current_user) + Gitlab::Sentry.track_acceptable_exception(exception, extra: params) end # lifted from https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#L60 |