gitlab-org--gitlab-foss/lib/gitlab/marginalia/active_record_instrumentati...

13 lines
288 B
Ruby

# 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