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

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

# Patch to annotate sql only when the feature is enabled.
module Gitlab
  module Marginalia
    module ActiveRecordInstrumentation
      def annotate_sql(sql)
        Gitlab::Marginalia.cached_feature_enabled? ? super(sql) : sql
      end
    end
  end
end