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:
Diffstat (limited to 'lib/gitlab/tracking.rb')
-rw-r--r--lib/gitlab/tracking.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/tracking.rb b/lib/gitlab/tracking.rb
index 3bbcd59f45e..0b606b712c7 100644
--- a/lib/gitlab/tracking.rb
+++ b/lib/gitlab/tracking.rb
@@ -6,10 +6,16 @@
module Gitlab
module Tracking
class << self
+ delegate :flush, to: :tracker
+
def enabled?
tracker.enabled?
end
+ def micro_verification_enabled?
+ Gitlab::Utils.to_boolean(ENV['VERIFY_TRACKING'], default: false)
+ end
+
def event(category, action, label: nil, property: nil, value: nil, context: [], project: nil, user: nil, namespace: nil, **extra) # rubocop:disable Metrics/ParameterLists
action = action.to_s
@@ -66,7 +72,7 @@ module Gitlab
end
def snowplow_micro_enabled?
- Rails.env.development? && Gitlab.config.snowplow_micro.enabled
+ (Rails.env.development? || micro_verification_enabled?) && Gitlab.config.snowplow_micro.enabled
rescue GitlabSettings::MissingSetting
false
end