debian-mirror-gitlab/app/assets/javascripts/error_tracking/utils.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
917 B
JavaScript
Raw Normal View History

2020-06-23 00:09:42 +05:30
/* eslint-disable @gitlab/require-i18n-strings */
2019-12-21 20:55:43 +05:30
/**
* Tracks snowplow event when User clicks on error link to Sentry
* @param {String} externalUrl that will be send as a property for the event
*/
2021-03-08 18:12:59 +05:30
export const trackClickErrorLinkToSentryOptions = (url) => ({
2019-12-21 20:55:43 +05:30
category: 'Error Tracking',
action: 'click_error_link_to_sentry',
label: 'Error Link',
property: url,
});
2020-06-23 00:09:42 +05:30
/**
* Tracks snowplow event when user views error list
*/
export const trackErrorListViewsOptions = {
category: 'Error Tracking',
action: 'view_errors_list',
};
/**
* Tracks snowplow event when user views error details
*/
export const trackErrorDetailsViewsOptions = {
category: 'Error Tracking',
action: 'view_error_details',
};
/**
* Tracks snowplow event when error status is updated
*/
2021-03-08 18:12:59 +05:30
export const trackErrorStatusUpdateOptions = (status) => ({
2020-06-23 00:09:42 +05:30
category: 'Error Tracking',
action: `update_${status}_status`,
});