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

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

module Gitlab
  module SidekiqMiddleware
    class CorrelationInjector
      def call(worker_class, job, queue, redis_pool)
        job[Labkit::Correlation::CorrelationId::LOG_KEY] ||=
          Labkit::Correlation::CorrelationId.current_or_new_id

        yield
      end
    end
  end
end