summaryrefslogtreecommitdiff
path: root/lib/api/api.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-12-05 21:54:40 +0100
committerKamil Trzciński <ayufan@ayufan.eu>2018-12-06 20:46:14 +0100
commit39c1731a53d1014eab7c876d70632b1abf738712 (patch)
tree5d51a48a32a92fdedf7b907a32caa172d1c0d923 /lib/api/api.rb
parentcfe484795d4ddb8c7b3247802547e3da74c64cf2 (diff)
downloadgitlab-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/api.rb')
-rw-r--r--lib/api/api.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb
index a4bf0d77eb1..8abb24e6f69 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -20,7 +20,8 @@ module API
Gitlab::GrapeLogging::Loggers::RouteLogger.new,
Gitlab::GrapeLogging::Loggers::UserLogger.new,
Gitlab::GrapeLogging::Loggers::QueueDurationLogger.new,
- Gitlab::GrapeLogging::Loggers::PerfLogger.new
+ Gitlab::GrapeLogging::Loggers::PerfLogger.new,
+ Gitlab::GrapeLogging::Loggers::CorrelationIdLogger.new
]
allow_access_with_scope :api
@@ -84,7 +85,6 @@ module API
content_type :txt, "text/plain"
# Ensure the namespace is right, otherwise we might load Grape::API::Helpers
- helpers ::SentryHelper
helpers ::API::Helpers
helpers ::API::Helpers::CommonHelpers