Просмотр исходного кода

Merge pull request #2922 from overleaf/jpa-fix-sentry-frontend

[misc] fix sentry integration for the frontend

GitOrigin-RevId: 269eb3c538e1dc891c4598b608b3392ee22320e0
Jakob Ackermann 6 лет назад
Родитель
Сommit
ae327e7fd0

+ 0 - 4
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', [

+ 5 - 0
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

+ 1 - 5
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