add analytics log on app crash (#14575)
This commit is contained in:
parent
7ba4f0679a
commit
ed59802702
|
|
@ -3,6 +3,7 @@ import styled from "styled-components";
|
|||
import AppCrashImage from "assets/images/404-image.png";
|
||||
import * as Sentry from "@sentry/react";
|
||||
import log from "loglevel";
|
||||
import AnalyticsUtil from "utils/AnalyticsUtil";
|
||||
|
||||
const Wrapper = styled.div`
|
||||
display: flex;
|
||||
|
|
@ -42,6 +43,7 @@ class AppErrorBoundary extends Component {
|
|||
componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
|
||||
log.error({ error, errorInfo });
|
||||
Sentry.captureException(error);
|
||||
AnalyticsUtil.logEvent("APP_CRASH", { error, errorInfo });
|
||||
this.setState({
|
||||
hasError: true,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ export type EventLocation =
|
|||
| "OMNIBAR";
|
||||
|
||||
export type EventName =
|
||||
| "APP_CRASH"
|
||||
| "SWITCH_DATASOURCE"
|
||||
| "LOGIN_CLICK"
|
||||
| "SIGNUP_CLICK"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user