diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-11 12:06:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-11 12:06:43 +0300 |
commit | 0dea53d5e575c6c15ce7384da73b8d4a95b1c8cf (patch) | |
tree | 43eb08e897fbac74f151eb650bde6029b6280a6e /lib/gitlab | |
parent | b4e072cbaf808793bafff148b0ec9d47819f479e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/tracking.rb | 11 |
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) { |