Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-12-05 23:54:40 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-12-06 22:46:14 +0300
commit39c1731a53d1014eab7c876d70632b1abf738712 (patch)
tree5d51a48a32a92fdedf7b907a32caa172d1c0d923 /lib/gitlab/json_logger.rb
parentcfe484795d4ddb8c7b3247802547e3da74c64cf2 (diff)
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/gitlab/json_logger.rb')
-rw-r--r--lib/gitlab/json_logger.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/json_logger.rb b/lib/gitlab/json_logger.rb
index 3bff77731f6..a5a5759cc89 100644
--- a/lib/gitlab/json_logger.rb
+++ b/lib/gitlab/json_logger.rb
@@ -10,6 +10,7 @@ module Gitlab
data = {}
data[:severity] = severity
data[:time] = timestamp.utc.iso8601(3)
+ data[Gitlab::CorrelationId::LOG_KEY] = Gitlab::CorrelationId.current_id
case message
when String