From 4f4de36cacbcd137e9db2a7b1449bb803bf1f395 Mon Sep 17 00:00:00 2001 From: Andrew Newdigate Date: Mon, 18 Feb 2019 22:57:22 +0200 Subject: Migrate correlation and tracing code to LabKit This change is a fairly straightforward refactor to extract the tracing and correlation-id code from the gitlab rails codebase into the new LabKit-Ruby project. The corresponding import into LabKit-Ruby was in https://gitlab.com/gitlab-org/labkit-ruby/merge_requests/1 The code itself remains very similar for now. Extracting it allows us to reuse it in other projects, such as Gitaly-Ruby. This will give us the advantages of correlation-ids and distributed tracing in that project too. --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d5f1e35a79b..ceaa84acaba 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -128,7 +128,7 @@ class ApplicationController < ActionController::Base payload[:ua] = request.env["HTTP_USER_AGENT"] payload[:remote_ip] = request.remote_ip - payload[Gitlab::CorrelationId::LOG_KEY] = Gitlab::CorrelationId.current_id + payload[Labkit::Correlation::CorrelationId::LOG_KEY] = Labkit::Correlation::CorrelationId.current_id logged_user = auth_user -- cgit v1.2.1