From ae327e7fd0f3917623a9e8dbb8c9765c16092b25 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 23 Jun 2020 15:15:09 +0200 Subject: [PATCH] Merge pull request #2922 from overleaf/jpa-fix-sentry-frontend [misc] fix sentry integration for the frontend GitOrigin-RevId: 269eb3c538e1dc891c4598b608b3392ee22320e0 --- services/web/frontend/js/base.js | 4 ---- services/web/frontend/js/libraries.js | 5 +++++ services/web/frontend/js/utils/sentry.js | 6 +----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/services/web/frontend/js/base.js b/services/web/frontend/js/base.js index 027e7abb37..f83ce27c4f 100644 --- a/services/web/frontend/js/base.js +++ b/services/web/frontend/js/base.js @@ -22,10 +22,6 @@ import './modules/recursionHelper' import './modules/errorCatcher' import './modules/localStorage' import './modules/sessionStorage' -// Configure dynamically loaded assets (via webpack) to be downloaded from CDN -// See: https://webpack.js.org/guides/public-path/#on-the-fly -// eslint-disable-next-line no-undef -__webpack_public_path__ = window.baseAssetPath const App = angular .module('SharelatexApp', [ diff --git a/services/web/frontend/js/libraries.js b/services/web/frontend/js/libraries.js index 7cdf36219c..650f127750 100644 --- a/services/web/frontend/js/libraries.js +++ b/services/web/frontend/js/libraries.js @@ -10,3 +10,8 @@ import 'libs/angular-cookie' import 'libs/passfield' import 'libs/ng-tags-input-3.0.0' import 'libs/select/select' + +// Configure dynamically loaded assets (via webpack) to be downloaded from CDN +// See: https://webpack.js.org/guides/public-path/#on-the-fly +// eslint-disable-next-line no-undef, camelcase +__webpack_public_path__ = window.baseAssetPath diff --git a/services/web/frontend/js/utils/sentry.js b/services/web/frontend/js/utils/sentry.js index 9871b0c814..59852ad449 100644 --- a/services/web/frontend/js/utils/sentry.js +++ b/services/web/frontend/js/utils/sentry.js @@ -32,11 +32,7 @@ if (window.ExposedSettings.sentryDsn) { } }) - Sentry.configureScope(scope => { - if (window.user_id.length) { - scope.setUser(window.user_id) - } - }) + Sentry.setUser({ id: window.user_id }) // Previously Raven added itself as a global, so we mimic that old behaviour window.Raven = Sentry