Log an analytics event for cyclical dependency errors (#4323)

This commit is contained in:
Rishabh Saxena 2021-05-05 16:51:15 +05:30 committed by GitHub
parent 6cf3b8a901
commit 95f3cb8a9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -40,6 +40,7 @@ import {
} from "constants/messages";
import AppsmithConsole from "utils/AppsmithConsole";
import LOG_TYPE from "entities/AppsmithConsole/logtype";
import AnalyticsUtil from "utils/AnalyticsUtil";
let widgetTypeConfigMap: WidgetTypeConfigMap;
@ -66,6 +67,13 @@ const evalErrorHandler = (errors: EvalError[]) => {
// Level is warning because it could be a user error
level: Sentry.Severity.Warning,
});
// Log an analytics event for cyclical dep errors
AnalyticsUtil.logEvent("CYCLICAL_DEPENDENCY_ERROR", {
node,
entityType,
// Level is warning because it could be a user error
level: Sentry.Severity.Warning,
});
}
break;

View File

@ -119,7 +119,8 @@ export type EventName =
| "DEBUGGER_TAB_SWITCH"
| "DEBUGGER_ENTITY_NAVIGATION"
| "GSHEET_AUTH_INIT"
| "GSHEET_AUTH_COMPLETE";
| "GSHEET_AUTH_COMPLETE"
| "CYCLICAL_DEPENDENCY_ERROR";
function getApplicationId(location: Location) {
const pathSplit = location.pathname.split("/");