summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/error_tracking/utils.js
blob: b832b1371b1fa8d48afa255bd30e35fed82e542e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* eslint-disable @gitlab/i18n/no-non-i18n-strings */

/**
 * Tracks snowplow event when user clicks View in Sentry btn
 * @param {String}  externalUrl that will be send as a property for the event
 */
export const trackViewInSentryOptions = url => ({
  category: 'Error Tracking',
  action: 'click_view_in_sentry',
  label: 'External Url',
  property: url,
});

/**
 * Tracks snowplow event when User clicks on error link to Sentry
 * @param {String}  externalUrl that will be send as a property for the event
 */
export const trackClickErrorLinkToSentryOptions = url => ({
  category: 'Error Tracking',
  action: 'click_error_link_to_sentry',
  label: 'Error Link',
  property: url,
});