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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-12 00:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-12 00:09:00 +0300
commitbf217da41b429d80da49287b84dadcbf499ac22c (patch)
treeb3499733d7e1abb88a3f0975333c85d00a80fd96 /lib/gitlab/performance_bar
parent559d99e40299e67969023a1afd23d084fbf23ed1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/performance_bar')
-rw-r--r--lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb8
1 files changed, 7 insertions, 1 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 ac5c907465e..133d777fc32 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 Feature.enabled?(:performance_bar_stats)
+ return unless gather_stats?
@client.sadd(GitlabPerformanceBarStatsWorker::STATS_KEY, request_id)
@@ -43,6 +43,12 @@ 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