blob: eb9e9538b75641f9049e4236f847346c4238c693 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import * as Sentry from '@sentry/browser';
export const reportToSentry = (component, failureType) => {
Sentry.withScope((scope) => {
scope.setTag('component', component);
Sentry.captureException(failureType);
});
};
export const reportMessageToSentry = (component, message, context) => {
Sentry.withScope((scope) => {
// eslint-disable-next-line @gitlab/require-i18n-strings
scope.setContext('Vue data', context);
scope.setTag('component', component);
Sentry.captureMessage(message);
});
};
|