summaryrefslogtreecommitdiff
path: root/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb')
-rw-r--r--lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb b/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
index 133d777fc32..ac5c907465e 100644
--- a/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
+++ b/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
@@ -17,7 +17,7 @@ module Gitlab
# to a structured log
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def enqueue_stats_job(request_id)
- return unless gather_stats?
+ return unless Feature.enabled?(:performance_bar_stats)
@client.sadd(GitlabPerformanceBarStatsWorker::STATS_KEY, request_id)
@@ -43,12 +43,6 @@ module Gitlab
)
end
# rubocop:enable Gitlab/ModuleWithInstanceVariables
-
- def gather_stats?
- return unless Feature.enabled?(:performance_bar_stats)
-
- Gitlab.com? || Gitlab.staging? || !Rails.env.production?
- end
end
end
end