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>2019-10-11 12:06:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-11 12:06:43 +0300
commit0dea53d5e575c6c15ce7384da73b8d4a95b1c8cf (patch)
tree43eb08e897fbac74f151eb650bde6029b6280a6e /lib/gitlab/tracking.rb
parentb4e072cbaf808793bafff148b0ec9d47819f479e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/tracking.rb')
-rw-r--r--lib/gitlab/tracking.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/gitlab/tracking.rb b/lib/gitlab/tracking.rb
index 34eaf45aa75..2470685bc00 100644
--- a/lib/gitlab/tracking.rb
+++ b/lib/gitlab/tracking.rb
@@ -15,6 +15,10 @@ module Gitlab
category = args.delete(:category) || self.class.name
Gitlab::Tracking.event(category, action.to_s, **args)
end
+
+ def track_self_describing_event(schema_url, event_data_json, **args)
+ Gitlab::Tracking.self_describing_event(schema_url, event_data_json, **args)
+ end
end
class << self
@@ -28,6 +32,13 @@ module Gitlab
snowplow.track_struct_event(category, action, label, property, value, context, Time.now.to_i)
end
+ def self_describing_event(schema_url, event_data_json, context: nil)
+ return unless enabled?
+
+ event_json = SnowplowTracker::SelfDescribingJson.new(schema_url, event_data_json)
+ snowplow.track_self_describing_event(event_json, context, Time.now.to_i)
+ end
+
def snowplow_options(group)
additional_features = Feature.enabled?(:additional_snowplow_tracking, group)
{