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

correlation_logger.rb « sidekiq_middleware « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cb8ff4a62847a276f212124d264c0c0eedeab7ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Gitlab
  module SidekiqMiddleware
    class CorrelationLogger
      def call(worker, job, queue)
        correlation_id = job[Gitlab::CorrelationId::LOG_KEY]

        Gitlab::CorrelationId.use_id(correlation_id) do
          yield
        end
      end
    end
  end
end