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. --- spec/lib/gitlab/sentry_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/lib/gitlab/sentry_spec.rb') diff --git a/spec/lib/gitlab/sentry_spec.rb b/spec/lib/gitlab/sentry_spec.rb index 1128eaf8560..ae522a588ee 100644 --- a/spec/lib/gitlab/sentry_spec.rb +++ b/spec/lib/gitlab/sentry_spec.rb @@ -27,7 +27,7 @@ describe Gitlab::Sentry do context 'when exceptions should not be raised' do before do allow(described_class).to receive(:should_raise_for_dev?).and_return(false) - allow(Gitlab::CorrelationId).to receive(:current_id).and_return('cid') + allow(Labkit::Correlation::CorrelationId).to receive(:current_id).and_return('cid') end it 'logs the exception with all attributes passed' do @@ -65,7 +65,7 @@ describe Gitlab::Sentry do before do allow(described_class).to receive(:enabled?).and_return(true) - allow(Gitlab::CorrelationId).to receive(:current_id).and_return('cid') + allow(Labkit::Correlation::CorrelationId).to receive(:current_id).and_return('cid') end it 'calls Raven.capture_exception' do -- cgit v1.2.1