Include sentry username
This commit is contained in:
@@ -28,6 +28,7 @@ import {
|
||||
validatePasswordResetSuccess,
|
||||
} from "./user.actions";
|
||||
import UserActionTypes from "./user.types";
|
||||
import * as Sentry from "@sentry/browser";
|
||||
|
||||
export function* onEmailSignInStart() {
|
||||
yield takeLatest(UserActionTypes.EMAIL_SIGN_IN_START, signInWithEmail);
|
||||
@@ -178,6 +179,11 @@ export function* signInSuccessSaga({ payload }) {
|
||||
]);
|
||||
console.log("Setting $crisp segments", ["user"]);
|
||||
window.$crisp.push(["set", "session:segments", [["user"]]]);
|
||||
|
||||
Sentry.setUser({
|
||||
email: payload.email,
|
||||
username: payload.displayName || payload.email,
|
||||
});
|
||||
} catch (error) {
|
||||
console.log("Error updating Crisp settings.", error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user