fix: Instrumentation for execution errors (#18093)

* fix: Instrumentation for execution errors

* added widget editor error event
This commit is contained in:
ChandanBalajiBP 2022-11-14 12:31:55 +05:30 committed by GitHub
parent e64f87e033
commit 2184eb8acd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 1 deletions

View File

@ -387,6 +387,11 @@ function ApiResponseView(props: Props) {
const selectedResponseTab = useSelector(getApiPaneResponseSelectedTab);
const updateSelectedResponseTab = useCallback((tabKey: string) => {
if (tabKey === DEBUGGER_TAB_KEYS.ERROR_TAB) {
AnalyticsUtil.logEvent("OPEN_DEBUGGER", {
source: "API_PANE",
});
}
dispatch(setApiPaneResponseSelectedTab(tabKey));
}, []);

View File

@ -7,6 +7,7 @@ import {
setCanvasDebuggerSelectedTab,
showDebugger,
} from "actions/debuggerActions";
import AnalyticsUtil from "utils/AnalyticsUtil";
import Errors from "./Errors";
import Resizer, { ResizerCSS } from "./Resizer";
import EntityDeps from "./EntityDependecies";
@ -72,6 +73,11 @@ function DebuggerTabs() {
const panelRef: RefObject<HTMLDivElement> = useRef(null);
const selectedTab = useSelector(getSelectedCanvasDebuggerTab);
const setSelectedTab = (tabKey: string) => {
if (tabKey === DEBUGGER_TAB_KEYS.ERROR_TAB) {
AnalyticsUtil.logEvent("OPEN_DEBUGGER", {
source: "WIDGET_EDITOR",
});
}
dispatch(setCanvasDebuggerSelectedTab(tabKey));
};
const onClose = () => dispatch(showDebugger(false));

View File

@ -758,6 +758,11 @@ export function EditorJSONtoForm(props: Props) {
});
const onResponseTabSelect = (tabKey: string) => {
if (tabKey === DEBUGGER_TAB_KEYS.ERROR_TAB) {
AnalyticsUtil.logEvent("OPEN_DEBUGGER", {
source: "QUERY_PANE",
});
}
updateActionResponseDisplayFormat({
id: currentActionConfig?.id || "",
field: "responseDisplayFormat",

View File

@ -1,4 +1,4 @@
import acorn, { parse, Node, SourceLocation, Options, Comment } from "acorn";
import { parse, Node, SourceLocation, Options, Comment } from "acorn";
import { ancestor, simple } from "acorn-walk";
import { ECMA_VERSION, NodeTypes } from "./constants/ast";
import { has, isFinite, isString, memoize, toPath } from "lodash";