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>2022-07-04 12:09:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-04 12:09:31 +0300
commit54cd986c9f16b5f7587b072ee8eb84bbf6642e8c (patch)
treec1ce6fbbcb3c9b90132e8459044ac06d255c54a9 /lib/gitlab/tracking.rb
parent529d16eb9ca2b5fd437fbd9518a3f88f0429cb3a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/tracking.rb')
-rw-r--r--lib/gitlab/tracking.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/gitlab/tracking.rb b/lib/gitlab/tracking.rb
index 0e7812d08b8..ae3f02c8c1c 100644
--- a/lib/gitlab/tracking.rb
+++ b/lib/gitlab/tracking.rb
@@ -4,13 +4,13 @@ module Gitlab
module Tracking
class << self
def enabled?
- snowplow.enabled?
+ tracker.enabled?
end
def event(category, action, label: nil, property: nil, value: nil, context: [], project: nil, user: nil, namespace: nil, **extra) # rubocop:disable Metrics/ParameterLists
contexts = [Tracking::StandardContext.new(project: project, user: user, namespace: namespace, **extra).to_context, *context]
- snowplow.event(category, action, label: label, property: property, value: value, context: contexts)
+ tracker.event(category, action, label: label, property: property, value: value, context: contexts)
rescue StandardError => error
Gitlab::ErrorTracking.track_and_raise_for_dev_exception(error, snowplow_category: category, snowplow_action: action)
end
@@ -31,11 +31,11 @@ module Gitlab
end
def options(group)
- snowplow.options(group)
+ tracker.options(group)
end
def collector_hostname
- snowplow.hostname
+ tracker.hostname
end
def snowplow_micro_enabled?
@@ -44,12 +44,12 @@ module Gitlab
private
- def snowplow
- @snowplow ||= if snowplow_micro_enabled?
- Gitlab::Tracking::Destinations::SnowplowMicro.new
- else
- Gitlab::Tracking::Destinations::Snowplow.new
- end
+ def tracker
+ @tracker ||= if snowplow_micro_enabled?
+ Gitlab::Tracking::Destinations::SnowplowMicro.new
+ else
+ Gitlab::Tracking::Destinations::Snowplow.new
+ end
end
end
end