diff --git a/app/client/build.sh b/app/client/build.sh index c71f8d9d7a..85cf9bd4e8 100755 --- a/app/client/build.sh +++ b/app/client/build.sh @@ -1,13 +1,11 @@ #!/bin/sh -# GIT_SHA=$(eval git rev-parse HEAD) # GIT_BRANCH=$(git branch --no-color | grep -E '^\*' | sed 's/\*[^a-z]*//g') - # RELEASE="${GIT_BRANCH}_${GIT_SHA}" - - # RELEASE=$(echo "$RELEASE" | sed -e 's/[\/\\\ .]/\-/g') # echo $RELEASE +GIT_SHA=$(eval git rev-parse HEAD) +echo $GIT_SHA REACT_APP_SENTRY_RELEASE=$GIT_SHA craco --max-old-space-size=4096 build --config craco.build.config.js rm ./build/static/js/*.js.map diff --git a/app/client/src/sagas/userSagas.tsx b/app/client/src/sagas/userSagas.tsx index 5f58ee0417..2ac095e0e3 100644 --- a/app/client/src/sagas/userSagas.tsx +++ b/app/client/src/sagas/userSagas.tsx @@ -22,6 +22,7 @@ import { getResponseErrorMessage, callAPI, } from "./ErrorSagas"; +import * as Sentry from "@sentry/browser"; import { fetchOrgsSaga } from "./OrgSagas"; @@ -295,6 +296,9 @@ export function* setCurrentUserSaga(action: ReduxAction) { const me = yield call(fetchUserSaga, action); if (me) { AnalyticsUtil.identifyUser(me.id, me); + Sentry.configureScope(function(scope) { + scope.setUser({ email: me.email, id: me.id }); + }); resetAuthExpiration(); yield put({ type: ReduxActionTypes.SET_CURRENT_USER_SUCCESS,