diff options
Diffstat (limited to 'app/assets/javascripts/ci/utils.js')
-rw-r--r-- | app/assets/javascripts/ci/utils.js | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/app/assets/javascripts/ci/utils.js b/app/assets/javascripts/ci/utils.js index eb9e9538b75..8a4f28404c6 100644 --- a/app/assets/javascripts/ci/utils.js +++ b/app/assets/javascripts/ci/utils.js @@ -1,17 +1,9 @@ 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); + Sentry.captureException(failureType, { + tags: { + component, + }, }); }; |