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.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/gitlab/tracking.rb b/lib/gitlab/tracking.rb
index ec032cf2d3c..a58b4beb0df 100644
--- a/lib/gitlab/tracking.rb
+++ b/lib/gitlab/tracking.rb
@@ -2,11 +2,9 @@
module Gitlab
module Tracking
- SNOWPLOW_NAMESPACE = 'gl'
-
class << self
def enabled?
- snowplow_micro_enabled? || Gitlab::CurrentSettings.snowplow_enabled?
+ snowplow.enabled?
end
def event(category, action, label: nil, property: nil, value: nil, context: [], project: nil, user: nil, namespace: nil, **extra) # rubocop:disable Metrics/ParameterLists
@@ -25,6 +23,10 @@ module Gitlab
snowplow.hostname
end
+ def snowplow_micro_enabled?
+ Rails.env.development? && Gitlab::Utils.to_boolean(ENV['SNOWPLOW_MICRO_ENABLE'])
+ end
+
private
def snowplow
@@ -34,10 +36,6 @@ module Gitlab
Gitlab::Tracking::Destinations::Snowplow.new
end
end
-
- def snowplow_micro_enabled?
- Rails.env.development? && Gitlab::Utils.to_boolean(ENV['SNOWPLOW_MICRO_ENABLE'])
- end
end
end
end