diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-25 21:12:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-25 21:12:16 +0300 |
commit | 942229d2b424e0c505aa676cbd8e173e4c99d83a (patch) | |
tree | 027906274143f48ba7aa67829a4ca898b23bc94d /lib/gitlab/usage_data_non_sql_metrics.rb | |
parent | 82c63f420c7fc2229a44aa336d656a9712884f83 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/usage_data_non_sql_metrics.rb')
-rw-r--r-- | lib/gitlab/usage_data_non_sql_metrics.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/usage_data_non_sql_metrics.rb b/lib/gitlab/usage_data_non_sql_metrics.rb index 1ff4588d091..f425ea92729 100644 --- a/lib/gitlab/usage_data_non_sql_metrics.rb +++ b/lib/gitlab/usage_data_non_sql_metrics.rb @@ -6,7 +6,10 @@ module Gitlab class << self def uncached_data - super.with_indifferent_access.deep_merge(instrumentation_metrics_queries.with_indifferent_access) + # instrumentation_metrics is already included with feature flag enabled + return super if Feature.enabled?(:usage_data_instrumentation) + + super.with_indifferent_access.deep_merge(instrumentation_metrics.with_indifferent_access) end def add_metric(metric, time_frame: 'none') @@ -50,7 +53,7 @@ module Gitlab private - def instrumentation_metrics_queries + def instrumentation_metrics ::Gitlab::Usage::Metric.all.map(&:with_instrumentation).reduce({}, :deep_merge) end end |