chore: ce - remove sentry performance tracker (#35710)
## Description Fix the following errors ### POST https://o296332.ingest.sentry.io/api/1546547/envelope/... 429 (Too Many Requests) We have an integration with Sentry to instrument page loads and other transactions. This is no longer used. All page load metrics are collected using a new relic integration. The sentry transactions api was throwing a 429 error when we exceed our trial quota. Removing the integration should curb this error. <img width="1181" alt="Screenshot 2024-08-15 at 1 22 28 PM" src="https://github.com/user-attachments/assets/543c0ec1-e87f-4439-b715-e75b3a6fd3ed"> [Slack thread ](https://theappsmith.slack.com/archives/CGBPVEJ5C/p1723699775838509)for more context on our sentry sub exceeding its quota. ### TypeError: e.className.split is not a function at t.value (PageLoadInstrumentation.ts:112:33) Add a type check for string. Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10400625143> > Commit: fc83198b613a973c9a02644fc742947a92bfbd3c > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10400625143&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 15 Aug 2024 08:45:49 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Removed performance tracking functionality across various components and sagas, simplifying the codebase and reducing overhead. - **Bug Fixes** - No specific bug fixes were made; improvements focus on performance tracking removal. - **Chores** - Eliminated unnecessary dependencies related to performance metrics, streamlining the application's dependency management. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
ee9cd3b29d
commit
ed17ee0376
|
|
@ -83,7 +83,6 @@
|
||||||
"@opentelemetry/semantic-conventions": "1.25.1",
|
"@opentelemetry/semantic-conventions": "1.25.1",
|
||||||
"@react-types/shared": "^3.23.0",
|
"@react-types/shared": "^3.23.0",
|
||||||
"@sentry/react": "^6.2.4",
|
"@sentry/react": "^6.2.4",
|
||||||
"@sentry/tracing": "^6.2.4",
|
|
||||||
"@shared/ast": "workspace:^",
|
"@shared/ast": "workspace:^",
|
||||||
"@shared/dsl": "workspace:^",
|
"@shared/dsl": "workspace:^",
|
||||||
"@tanstack/virtual-core": "^3.0.0-beta.18",
|
"@tanstack/virtual-core": "^3.0.0-beta.18",
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import type {
|
||||||
FCPMetricWithAttribution,
|
FCPMetricWithAttribution,
|
||||||
NavigationTimingPolyfillEntry,
|
NavigationTimingPolyfillEntry,
|
||||||
} from "web-vitals";
|
} from "web-vitals";
|
||||||
|
import isString from "lodash/isString";
|
||||||
|
|
||||||
export class PageLoadInstrumentation extends InstrumentationBase {
|
export class PageLoadInstrumentation extends InstrumentationBase {
|
||||||
// PerformanceObserver to observe resource timings
|
// PerformanceObserver to observe resource timings
|
||||||
|
|
@ -108,7 +109,7 @@ export class PageLoadInstrumentation extends InstrumentationBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
const elementTestId = element.getAttribute("data-testid");
|
const elementTestId = element.getAttribute("data-testid");
|
||||||
const className = element.className
|
const className = isString(element.className)
|
||||||
? "." + element.className.split(" ").join(".")
|
? "." + element.className.split(" ").join(".")
|
||||||
: "";
|
: "";
|
||||||
const elementId = element.id ? `#${element.id}` : "";
|
const elementId = element.id ? `#${element.id}` : "";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
import type { AppsmithUIConfigs } from "./types";
|
import type { AppsmithUIConfigs } from "./types";
|
||||||
import { Integrations } from "@sentry/tracing";
|
|
||||||
import * as Sentry from "@sentry/react";
|
|
||||||
import { createBrowserHistory } from "history";
|
|
||||||
|
|
||||||
export interface INJECTED_CONFIGS {
|
export interface INJECTED_CONFIGS {
|
||||||
sentry: {
|
sentry: {
|
||||||
|
|
@ -240,17 +237,6 @@ export const getAppsmithConfigs = (): AppsmithUIConfigs => {
|
||||||
release: sentryRelease.value,
|
release: sentryRelease.value,
|
||||||
environment: sentryENV.value,
|
environment: sentryENV.value,
|
||||||
normalizeDepth: 3,
|
normalizeDepth: 3,
|
||||||
integrations: [
|
|
||||||
typeof window === "undefined"
|
|
||||||
? // The Browser Tracing instrumentation isn’t working (and is unnecessary) in the worker environment
|
|
||||||
undefined
|
|
||||||
: new Integrations.BrowserTracing({
|
|
||||||
// Can also use reactRouterV4Instrumentation
|
|
||||||
routingInstrumentation: Sentry.reactRouterV5Instrumentation(
|
|
||||||
createBrowserHistory(),
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
].filter((i) => i !== undefined),
|
|
||||||
tracesSampleRate: 0.1,
|
tracesSampleRate: 0.1,
|
||||||
},
|
},
|
||||||
smartLook: {
|
smartLook: {
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,6 @@ export interface AppsmithUIConfigs {
|
||||||
dsn: string;
|
dsn: string;
|
||||||
release: string;
|
release: string;
|
||||||
environment: string;
|
environment: string;
|
||||||
// TODO: Fix this the next time the file is edited
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
integrations: any[];
|
|
||||||
normalizeDepth: number;
|
normalizeDepth: number;
|
||||||
tracesSampleRate: number;
|
tracesSampleRate: number;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,6 @@ import { useHistory, useLocation, useRouteMatch } from "react-router-dom";
|
||||||
import { getCurrentUser } from "selectors/usersSelectors";
|
import { getCurrentUser } from "selectors/usersSelectors";
|
||||||
import styled, { ThemeContext } from "styled-components";
|
import styled, { ThemeContext } from "styled-components";
|
||||||
import { getNextEntityName, getRandomPaletteColor } from "utils/AppsmithUtils";
|
import { getNextEntityName, getRandomPaletteColor } from "utils/AppsmithUtils";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
|
|
||||||
import { getAppsmithConfigs } from "ee/configs";
|
import { getAppsmithConfigs } from "ee/configs";
|
||||||
import type { Workspace } from "ee/constants/workspaceConstants";
|
import type { Workspace } from "ee/constants/workspaceConstants";
|
||||||
|
|
@ -1120,8 +1117,6 @@ export class Applications<
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
PerformanceTracker.stopTracking(PerformanceTransactionName.LOGIN_CLICK);
|
|
||||||
PerformanceTracker.stopTracking(PerformanceTransactionName.SIGN_UP);
|
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
const workspaceIdFromQueryParams = urlParams.get("workspaceId");
|
const workspaceIdFromQueryParams = urlParams.get("workspaceId");
|
||||||
this.props.getAllWorkspaces({
|
this.props.getAllWorkspaces({
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { useEffect } from "react";
|
import React from "react";
|
||||||
import { Route, Switch } from "react-router-dom";
|
import { Route, Switch } from "react-router-dom";
|
||||||
import { useLocation, useRouteMatch } from "react-router";
|
import { useRouteMatch } from "react-router";
|
||||||
import ApiEditor from "pages/Editor/APIEditor";
|
import ApiEditor from "pages/Editor/APIEditor";
|
||||||
import QueryEditor from "pages/Editor/QueryEditor";
|
import QueryEditor from "pages/Editor/QueryEditor";
|
||||||
import JSEditor from "pages/Editor/JSEditor";
|
import JSEditor from "pages/Editor/JSEditor";
|
||||||
|
|
@ -13,9 +13,6 @@ import {
|
||||||
JS_COLLECTION_ID_PATH,
|
JS_COLLECTION_ID_PATH,
|
||||||
QUERIES_EDITOR_ID_PATH,
|
QUERIES_EDITOR_ID_PATH,
|
||||||
} from "constants/routes";
|
} from "constants/routes";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
import { SaaSEditorRoutes } from "pages/Editor/SaaSEditor/routes";
|
import { SaaSEditorRoutes } from "pages/Editor/SaaSEditor/routes";
|
||||||
import OnboardingChecklist from "pages/Editor/FirstTimeUserOnboarding/Checklist";
|
import OnboardingChecklist from "pages/Editor/FirstTimeUserOnboarding/Checklist";
|
||||||
|
|
@ -26,16 +23,6 @@ const SentryRoute = Sentry.withSentryRouting(Route);
|
||||||
|
|
||||||
function EditorRoutes() {
|
function EditorRoutes() {
|
||||||
const { path } = useRouteMatch();
|
const { path } = useRouteMatch();
|
||||||
const { pathname } = useLocation();
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
return () => {
|
|
||||||
PerformanceTracker.startTracking(
|
|
||||||
PerformanceTransactionName.CLOSE_SIDE_PANE,
|
|
||||||
{ path: pathname },
|
|
||||||
);
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Switch key={path}>
|
<Switch key={path}>
|
||||||
|
|
|
||||||
|
|
@ -97,9 +97,6 @@ import type { UrlDataState } from "reducers/entityReducers/appReducer";
|
||||||
import { APP_MODE } from "entities/App";
|
import { APP_MODE } from "entities/App";
|
||||||
import { clearEvalCache } from "../../sagas/EvaluationsSaga";
|
import { clearEvalCache } from "../../sagas/EvaluationsSaga";
|
||||||
import { getQueryParams } from "utils/URLUtils";
|
import { getQueryParams } from "utils/URLUtils";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import log from "loglevel";
|
import log from "loglevel";
|
||||||
import { migrateIncorrectDynamicBindingPathLists } from "utils/migrations/IncorrectDynamicBindingPathLists";
|
import { migrateIncorrectDynamicBindingPathLists } from "utils/migrations/IncorrectDynamicBindingPathLists";
|
||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
|
|
@ -298,10 +295,6 @@ export function* fetchPageSaga(action: ReduxAction<FetchPageActionPayload>) {
|
||||||
isFirstLoad = false,
|
isFirstLoad = false,
|
||||||
pageWithMigratedDsl,
|
pageWithMigratedDsl,
|
||||||
} = action.payload;
|
} = action.payload;
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_PAGE_API,
|
|
||||||
{ pageId },
|
|
||||||
);
|
|
||||||
|
|
||||||
const params: FetchPageRequest = { pageId, migrateDSL: true };
|
const params: FetchPageRequest = { pageId, migrateDSL: true };
|
||||||
const fetchPageResponse: FetchPageResponse = yield call(
|
const fetchPageResponse: FetchPageResponse = yield call(
|
||||||
|
|
@ -315,18 +308,8 @@ export function* fetchPageSaga(action: ReduxAction<FetchPageActionPayload>) {
|
||||||
pageId,
|
pageId,
|
||||||
isFirstLoad,
|
isFirstLoad,
|
||||||
});
|
});
|
||||||
|
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_PAGE_API,
|
|
||||||
);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.error(error);
|
log.error(error);
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_PAGE_API,
|
|
||||||
{
|
|
||||||
failed: true,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
yield put({
|
yield put({
|
||||||
type: ReduxActionErrorTypes.FETCH_PAGE_ERROR,
|
type: ReduxActionErrorTypes.FETCH_PAGE_ERROR,
|
||||||
payload: {
|
payload: {
|
||||||
|
|
@ -342,13 +325,7 @@ export function* fetchPublishedPageSaga(
|
||||||
try {
|
try {
|
||||||
const { bustCache, firstLoad, pageId, pageWithMigratedDsl } =
|
const { bustCache, firstLoad, pageId, pageWithMigratedDsl } =
|
||||||
action.payload;
|
action.payload;
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_PAGE_API,
|
|
||||||
{
|
|
||||||
pageId: pageId,
|
|
||||||
published: true,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
const params = { pageId, bustCache };
|
const params = { pageId, bustCache };
|
||||||
const response: FetchPageResponse = yield call(
|
const response: FetchPageResponse = yield call(
|
||||||
getFromServerWhenNoPrefetchedResult,
|
getFromServerWhenNoPrefetchedResult,
|
||||||
|
|
@ -392,18 +369,8 @@ export function* fetchPublishedPageSaga(
|
||||||
if (!firstLoad) {
|
if (!firstLoad) {
|
||||||
yield put(fetchAllPageEntityCompletion([executePageLoadActions()]));
|
yield put(fetchAllPageEntityCompletion([executePageLoadActions()]));
|
||||||
}
|
}
|
||||||
|
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_PAGE_API,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_PAGE_API,
|
|
||||||
{
|
|
||||||
failed: true,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
yield put({
|
yield put({
|
||||||
type: ReduxActionErrorTypes.FETCH_PUBLISHED_PAGE_ERROR,
|
type: ReduxActionErrorTypes.FETCH_PUBLISHED_PAGE_ERROR,
|
||||||
payload: {
|
payload: {
|
||||||
|
|
@ -447,12 +414,7 @@ export function* savePageSaga(action: ReduxAction<{ isRetry?: boolean }>) {
|
||||||
widgets,
|
widgets,
|
||||||
editorConfigs,
|
editorConfigs,
|
||||||
);
|
);
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.SAVE_PAGE_API,
|
|
||||||
{
|
|
||||||
pageId: savePageRequest.pageId,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
try {
|
try {
|
||||||
// Store the updated DSL in the pageDSLs reducer
|
// Store the updated DSL in the pageDSLs reducer
|
||||||
yield put({
|
yield put({
|
||||||
|
|
@ -512,22 +474,13 @@ export function* savePageSaga(action: ReduxAction<{ isRetry?: boolean }>) {
|
||||||
}
|
}
|
||||||
yield put(setLastUpdatedTime(Date.now() / 1000));
|
yield put(setLastUpdatedTime(Date.now() / 1000));
|
||||||
yield put(savePageSuccess(savePageResponse));
|
yield put(savePageSuccess(savePageResponse));
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.SAVE_PAGE_API,
|
|
||||||
);
|
|
||||||
checkAndLogErrorsIfCyclicDependency(
|
checkAndLogErrorsIfCyclicDependency(
|
||||||
(savePageResponse.data as SavePageResponseData)
|
(savePageResponse.data as SavePageResponseData)
|
||||||
.layoutOnLoadActionErrors,
|
.layoutOnLoadActionErrors,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.SAVE_PAGE_API,
|
|
||||||
{
|
|
||||||
failed: true,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
if (error instanceof UserCancelledActionExecutionError) {
|
if (error instanceof UserCancelledActionExecutionError) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,6 @@ import {
|
||||||
} from "actions/userActions";
|
} from "actions/userActions";
|
||||||
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
||||||
import { INVITE_USERS_TO_WORKSPACE_FORM } from "ee/constants/forms";
|
import { INVITE_USERS_TO_WORKSPACE_FORM } from "ee/constants/forms";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import type { User } from "constants/userConstants";
|
import type { User } from "constants/userConstants";
|
||||||
import { ANONYMOUS_USERNAME } from "constants/userConstants";
|
import { ANONYMOUS_USERNAME } from "constants/userConstants";
|
||||||
import {
|
import {
|
||||||
|
|
@ -154,9 +151,6 @@ export function* getCurrentUserSaga(action?: {
|
||||||
}) {
|
}) {
|
||||||
const userProfile = action?.payload?.userProfile;
|
const userProfile = action?.payload?.userProfile;
|
||||||
try {
|
try {
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.USER_ME_API,
|
|
||||||
);
|
|
||||||
const response: ApiResponse = yield call(
|
const response: ApiResponse = yield call(
|
||||||
getFromServerWhenNoPrefetchedResult,
|
getFromServerWhenNoPrefetchedResult,
|
||||||
userProfile,
|
userProfile,
|
||||||
|
|
@ -172,10 +166,6 @@ export function* getCurrentUserSaga(action?: {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.USER_ME_API,
|
|
||||||
{ failed: true },
|
|
||||||
);
|
|
||||||
yield put({
|
yield put({
|
||||||
type: ReduxActionErrorTypes.FETCH_USER_DETAILS_ERROR,
|
type: ReduxActionErrorTypes.FETCH_USER_DETAILS_ERROR,
|
||||||
payload: {
|
payload: {
|
||||||
|
|
@ -237,8 +227,6 @@ export function* runUserSideEffectsSaga() {
|
||||||
if (currentUser.emptyInstance) {
|
if (currentUser.emptyInstance) {
|
||||||
history.replace(SETUP);
|
history.replace(SETUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
PerformanceTracker.stopAsyncTracking(PerformanceTransactionName.USER_ME_API);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function* forgotPasswordSaga(
|
export function* forgotPasswordSaga(
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import { INTEGRATION_TABS } from "constants/routes";
|
import { INTEGRATION_TABS } from "constants/routes";
|
||||||
import { getQueryParams } from "utils/URLUtils";
|
import { getQueryParams } from "utils/URLUtils";
|
||||||
import { getIsGeneratePageInitiator } from "utils/GenerateCrudUtil";
|
import { getIsGeneratePageInitiator } from "utils/GenerateCrudUtil";
|
||||||
|
|
@ -42,11 +39,6 @@ function CloseEditor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
PerformanceTracker.startTracking(
|
|
||||||
PerformanceTransactionName.CLOSE_SIDE_PANE,
|
|
||||||
{ path: location.pathname },
|
|
||||||
);
|
|
||||||
|
|
||||||
// if it is a generate CRUD page flow from which user came here
|
// if it is a generate CRUD page flow from which user came here
|
||||||
// then route user back to `/generate-page/form`
|
// then route user back to `/generate-page/form`
|
||||||
// else go back to BUILDER_PAGE
|
// else go back to BUILDER_PAGE
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,6 @@ import BetaCard from "../BetaCard";
|
||||||
import type { NavigationData } from "selectors/navigationSelectors";
|
import type { NavigationData } from "selectors/navigationSelectors";
|
||||||
import type { AIEditorContext } from "ee/components/editorComponents/GPT";
|
import type { AIEditorContext } from "ee/components/editorComponents/GPT";
|
||||||
import type { EntityTypeValue } from "ee/entities/DataTree/types";
|
import type { EntityTypeValue } from "ee/entities/DataTree/types";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import history, { NavigationMethod } from "utils/history";
|
import history, { NavigationMethod } from "utils/history";
|
||||||
import type { Plugin } from "api/PluginApi";
|
import type { Plugin } from "api/PluginApi";
|
||||||
import { EDIT, createMessage } from "ee/constants/messages";
|
import { EDIT, createMessage } from "ee/constants/messages";
|
||||||
|
|
@ -224,9 +221,7 @@ export function Command(props: {
|
||||||
(event) => {
|
(event) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
if (!props.url) return;
|
if (!props.url) return;
|
||||||
PerformanceTracker.startTracking(PerformanceTransactionName.OPEN_ACTION, {
|
|
||||||
url: props.url,
|
|
||||||
});
|
|
||||||
history.push(props.url, { invokedBy: NavigationMethod.SlashCommandHint });
|
history.push(props.url, { invokedBy: NavigationMethod.SlashCommandHint });
|
||||||
AnalyticsUtil.logEvent("EDIT_ACTION_CLICK", props.eventParams || {});
|
AnalyticsUtil.logEvent("EDIT_ACTION_CLICK", props.eventParams || {});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,6 @@ import React, {
|
||||||
} from "react";
|
} from "react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
|
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import { updateExplorerWidthAction } from "actions/explorerActions";
|
import { updateExplorerWidthAction } from "actions/explorerActions";
|
||||||
import {
|
import {
|
||||||
getExplorerActive,
|
getExplorerActive,
|
||||||
|
|
@ -73,10 +70,6 @@ export const EntityExplorerSidebar = memo(({ children }: Props) => {
|
||||||
|
|
||||||
const resizer = useHorizontalResize(sidebarRef, onWidthChange, onDragEnd);
|
const resizer = useHorizontalResize(sidebarRef, onWidthChange, onDragEnd);
|
||||||
const [tooltipIsOpen, setTooltipIsOpen] = useState(false);
|
const [tooltipIsOpen, setTooltipIsOpen] = useState(false);
|
||||||
PerformanceTracker.startTracking(PerformanceTransactionName.SIDE_BAR_MOUNT);
|
|
||||||
useEffect(() => {
|
|
||||||
PerformanceTracker.stopTracking();
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* on hover of resizer, show tooltip
|
* on hover of resizer, show tooltip
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,6 @@ import * as Sentry from "@sentry/react";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import React, { memo, useContext, useEffect, useMemo, useRef } from "react";
|
import React, { memo, useContext, useEffect, useMemo, useRef } from "react";
|
||||||
|
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import { getSelectedWidgets } from "selectors/ui";
|
import { getSelectedWidgets } from "selectors/ui";
|
||||||
import { tailwindLayers } from "constants/Layers";
|
import { tailwindLayers } from "constants/Layers";
|
||||||
import WidgetPropertyPane from "pages/Editor/PropertyPane";
|
import WidgetPropertyPane from "pages/Editor/PropertyPane";
|
||||||
|
|
@ -75,11 +72,6 @@ export const PropertyPaneSidebar = memo((props: Props) => {
|
||||||
prevSelectedWidgetId.current =
|
prevSelectedWidgetId.current =
|
||||||
selectedWidgetIds.length === 1 ? selectedWidgetIds[0] : undefined;
|
selectedWidgetIds.length === 1 ? selectedWidgetIds[0] : undefined;
|
||||||
|
|
||||||
PerformanceTracker.startTracking(PerformanceTransactionName.SIDE_BAR_MOUNT);
|
|
||||||
useEffect(() => {
|
|
||||||
PerformanceTracker.stopTracking();
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* renders the property pane:
|
* renders the property pane:
|
||||||
* 2. if no widget is selected -> CanvasPropertyPane
|
* 2. if no widget is selected -> CanvasPropertyPane
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,6 @@ import {
|
||||||
import { getCurrentGitBranch } from "selectors/gitSyncSelectors";
|
import { getCurrentGitBranch } from "selectors/gitSyncSelectors";
|
||||||
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
||||||
import history from "utils/history";
|
import history from "utils/history";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import type { AppEnginePayload } from ".";
|
import type { AppEnginePayload } from ".";
|
||||||
import AppEngine, {
|
import AppEngine, {
|
||||||
ActionsNotFoundError,
|
ActionsNotFoundError,
|
||||||
|
|
@ -107,18 +104,6 @@ export default class AppEditorEngine extends AppEngine {
|
||||||
endSpan(editorSetupSpan);
|
endSpan(editorSetupSpan);
|
||||||
}
|
}
|
||||||
|
|
||||||
public startPerformanceTracking() {
|
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.INIT_EDIT_APP,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public stopPerformanceTracking() {
|
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.INIT_EDIT_APP,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private *loadPageThemesAndActions(
|
private *loadPageThemesAndActions(
|
||||||
toLoadPageId: string,
|
toLoadPageId: string,
|
||||||
applicationId: string,
|
applicationId: string,
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,6 @@ import {
|
||||||
reportSWStatus,
|
reportSWStatus,
|
||||||
waitForWidgetConfigBuild,
|
waitForWidgetConfigBuild,
|
||||||
} from "sagas/InitSagas";
|
} from "sagas/InitSagas";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import type { AppEnginePayload } from ".";
|
import type { AppEnginePayload } from ".";
|
||||||
import AppEngine, { ActionsNotFoundError } from ".";
|
import AppEngine, { ActionsNotFoundError } from ".";
|
||||||
import { fetchJSLibraries } from "actions/JSLibraryActions";
|
import { fetchJSLibraries } from "actions/JSLibraryActions";
|
||||||
|
|
@ -77,18 +74,6 @@ export default class AppViewerEngine extends AppEngine {
|
||||||
endSpan(viewerSetupSpan);
|
endSpan(viewerSetupSpan);
|
||||||
}
|
}
|
||||||
|
|
||||||
startPerformanceTracking() {
|
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.INIT_VIEW_APP,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
stopPerformanceTracking() {
|
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.INIT_VIEW_APP,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
*loadAppEntities(
|
*loadAppEntities(
|
||||||
toLoadPageId: string,
|
toLoadPageId: string,
|
||||||
applicationId: string,
|
applicationId: string,
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,6 @@ export default abstract class AppEngine {
|
||||||
rootSpan: Span,
|
rootSpan: Span,
|
||||||
): any;
|
): any;
|
||||||
abstract loadGit(applicationId: string, rootSpan: Span): any;
|
abstract loadGit(applicationId: string, rootSpan: Span): any;
|
||||||
abstract startPerformanceTracking(): any;
|
|
||||||
abstract stopPerformanceTracking(): any;
|
|
||||||
abstract completeChore(rootSpan: Span): any;
|
abstract completeChore(rootSpan: Span): any;
|
||||||
/* eslint-enable @typescript-eslint/no-explicit-any */
|
/* eslint-enable @typescript-eslint/no-explicit-any */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,6 @@ import {
|
||||||
ResponsiveBehavior,
|
ResponsiveBehavior,
|
||||||
} from "layoutSystems/common/utils/constants";
|
} from "layoutSystems/common/utils/constants";
|
||||||
import { useReflow } from "utils/hooks/useReflow";
|
import { useReflow } from "utils/hooks/useReflow";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import WidgetFactory from "WidgetProvider/factory";
|
import WidgetFactory from "WidgetProvider/factory";
|
||||||
import { isDropZoneOccupied } from "utils/WidgetPropsUtils";
|
import { isDropZoneOccupied } from "utils/WidgetPropsUtils";
|
||||||
import { isFunction } from "lodash";
|
import { isFunction } from "lodash";
|
||||||
|
|
@ -92,16 +89,7 @@ function AutoLayoutResizableComponent(props: ResizableProps) {
|
||||||
occupiedSpacesBySiblingWidgets,
|
occupiedSpacesBySiblingWidgets,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
// Performance tracking start
|
|
||||||
const sentryPerfTags = props.zWidgetType
|
|
||||||
? [{ name: "widget_type", value: props.zWidgetType }]
|
|
||||||
: [];
|
|
||||||
PerformanceTracker.startTracking(
|
|
||||||
PerformanceTransactionName.SHOW_RESIZE_HANDLES,
|
|
||||||
{ widgetId: props.zWidgetId },
|
|
||||||
true,
|
|
||||||
sentryPerfTags,
|
|
||||||
);
|
|
||||||
const reflowSelector = getReflowSelector(props.widgetId);
|
const reflowSelector = getReflowSelector(props.widgetId);
|
||||||
|
|
||||||
const equal = (
|
const equal = (
|
||||||
|
|
@ -126,11 +114,6 @@ function AutoLayoutResizableComponent(props: ResizableProps) {
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
PerformanceTracker.stopTracking(
|
|
||||||
PerformanceTransactionName.SHOW_RESIZE_HANDLES,
|
|
||||||
);
|
|
||||||
}, []);
|
|
||||||
//end
|
//end
|
||||||
const [pointerEvents, togglePointerEvents] = useState(true);
|
const [pointerEvents, togglePointerEvents] = useState(true);
|
||||||
const [newDimensions, set] = useState<DimensionUpdateProps>({
|
const [newDimensions, set] = useState<DimensionUpdateProps>({
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,6 @@ import {
|
||||||
ResizeWrapper,
|
ResizeWrapper,
|
||||||
} from "layoutSystems/common/resizer/common";
|
} from "layoutSystems/common/resizer/common";
|
||||||
import type { StyledComponent } from "styled-components";
|
import type { StyledComponent } from "styled-components";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
|
|
||||||
const getSnappedValues = (
|
const getSnappedValues = (
|
||||||
x: number,
|
x: number,
|
||||||
|
|
@ -103,23 +100,6 @@ interface ResizableProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ModalResizable(props: ResizableProps) {
|
export function ModalResizable(props: ResizableProps) {
|
||||||
// Performance tracking start
|
|
||||||
const sentryPerfTags = props.zWidgetType
|
|
||||||
? [{ name: "widget_type", value: props.zWidgetType }]
|
|
||||||
: [];
|
|
||||||
PerformanceTracker.startTracking(
|
|
||||||
PerformanceTransactionName.SHOW_RESIZE_HANDLES,
|
|
||||||
{ widgetId: props.widgetId },
|
|
||||||
true,
|
|
||||||
sentryPerfTags,
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
PerformanceTracker.stopTracking(
|
|
||||||
PerformanceTransactionName.SHOW_RESIZE_HANDLES,
|
|
||||||
);
|
|
||||||
});
|
|
||||||
//end
|
|
||||||
const [pointerEvents, togglePointerEvents] = useState(true);
|
const [pointerEvents, togglePointerEvents] = useState(true);
|
||||||
const [newDimensions, set] = useState({
|
const [newDimensions, set] = useState({
|
||||||
width: props.componentWidth,
|
width: props.componentWidth,
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,6 @@ import {
|
||||||
import { getIsTableFilterPaneVisible } from "selectors/tableFilterSelectors";
|
import { getIsTableFilterPaneVisible } from "selectors/tableFilterSelectors";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import WidgetFactory from "WidgetProvider/factory";
|
import WidgetFactory from "WidgetProvider/factory";
|
||||||
import { useShowTableFilterPane } from "utils/hooks/dragResizeHooks";
|
import { useShowTableFilterPane } from "utils/hooks/dragResizeHooks";
|
||||||
import { useWidgetSelection } from "utils/hooks/useWidgetSelection";
|
import { useWidgetSelection } from "utils/hooks/useWidgetSelection";
|
||||||
|
|
@ -113,12 +110,6 @@ export function WidgetNameComponent(props: WidgetNameComponentProps) {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
} else if (!isActiveInPropertyPane) {
|
} else if (!isActiveInPropertyPane) {
|
||||||
PerformanceTracker.startTracking(
|
|
||||||
PerformanceTransactionName.OPEN_PROPERTY_PANE,
|
|
||||||
{ widgetId: props.widgetId },
|
|
||||||
true,
|
|
||||||
[{ name: "widget_type", value: props.type }],
|
|
||||||
);
|
|
||||||
AnalyticsUtil.logEvent("PROPERTY_PANE_OPEN_CLICK", {
|
AnalyticsUtil.logEvent("PROPERTY_PANE_OPEN_CLICK", {
|
||||||
widgetType: props.type,
|
widgetType: props.type,
|
||||||
widgetId: props.widgetId,
|
widgetId: props.widgetId,
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,6 @@ import { getWidgetByID } from "sagas/selectors";
|
||||||
import { ReflowDirection } from "reflow/reflowTypes";
|
import { ReflowDirection } from "reflow/reflowTypes";
|
||||||
import { getContainerOccupiedSpacesSelectorWhileResizing } from "selectors/editorSelectors";
|
import { getContainerOccupiedSpacesSelectorWhileResizing } from "selectors/editorSelectors";
|
||||||
import { getReflowSelector } from "selectors/widgetReflowSelectors";
|
import { getReflowSelector } from "selectors/widgetReflowSelectors";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import { isDropZoneOccupied } from "utils/WidgetPropsUtils";
|
import { isDropZoneOccupied } from "utils/WidgetPropsUtils";
|
||||||
import { useReflow } from "utils/hooks/useReflow";
|
import { useReflow } from "utils/hooks/useReflow";
|
||||||
|
|
||||||
|
|
@ -44,16 +41,7 @@ export function FixedLayoutResizable(props: ResizableProps) {
|
||||||
occupiedSpacesBySiblingWidgets,
|
occupiedSpacesBySiblingWidgets,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
// Performance tracking start
|
|
||||||
const sentryPerfTags = props.zWidgetType
|
|
||||||
? [{ name: "widget_type", value: props.zWidgetType }]
|
|
||||||
: [];
|
|
||||||
PerformanceTracker.startTracking(
|
|
||||||
PerformanceTransactionName.SHOW_RESIZE_HANDLES,
|
|
||||||
{ widgetId: props.zWidgetId },
|
|
||||||
true,
|
|
||||||
sentryPerfTags,
|
|
||||||
);
|
|
||||||
const reflowSelector = getReflowSelector(props.widgetId);
|
const reflowSelector = getReflowSelector(props.widgetId);
|
||||||
|
|
||||||
const equal = (
|
const equal = (
|
||||||
|
|
@ -78,12 +66,6 @@ export function FixedLayoutResizable(props: ResizableProps) {
|
||||||
);
|
);
|
||||||
const widget = useSelector(getWidgetByID(props.widgetId));
|
const widget = useSelector(getWidgetByID(props.widgetId));
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
PerformanceTracker.stopTracking(
|
|
||||||
PerformanceTransactionName.SHOW_RESIZE_HANDLES,
|
|
||||||
);
|
|
||||||
}, []);
|
|
||||||
//end
|
|
||||||
const [pointerEvents, togglePointerEvents] = useState(true);
|
const [pointerEvents, togglePointerEvents] = useState(true);
|
||||||
const dimensionReflectionProps = {
|
const dimensionReflectionProps = {
|
||||||
reflectDimension: true,
|
reflectDimension: true,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import PageLoadingBar from "pages/common/PageLoadingBar";
|
import PageLoadingBar from "pages/common/PageLoadingBar";
|
||||||
import { retryPromise } from "utils/AppsmithUtils";
|
import { retryPromise } from "utils/AppsmithUtils";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { showDebugger } from "actions/debuggerActions";
|
import { showDebugger } from "actions/debuggerActions";
|
||||||
|
|
@ -25,7 +22,6 @@ class ApplicationListLoader extends React.PureComponent<any, { Page: any }> {
|
||||||
//Close debugger call is required because if we import the application page with debugger open
|
//Close debugger call is required because if we import the application page with debugger open
|
||||||
//it will cause a debugger to open. issue #21xxx
|
//it will cause a debugger to open. issue #21xxx
|
||||||
this.props.closeDebugger();
|
this.props.closeDebugger();
|
||||||
PerformanceTracker.stopTracking(PerformanceTransactionName.LOGIN_CLICK);
|
|
||||||
AnalyticsUtil.logEvent("APPLICATIONS_PAGE_LOAD");
|
AnalyticsUtil.logEvent("APPLICATIONS_PAGE_LOAD");
|
||||||
retryPromise(
|
retryPromise(
|
||||||
async () =>
|
async () =>
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,6 @@ import type { CSSProperties } from "styled-components";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper";
|
import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper";
|
||||||
import { changeApi } from "actions/apiPaneActions";
|
import { changeApi } from "actions/apiPaneActions";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
import EntityNotFoundPane from "pages/Editor/EntityNotFoundPane";
|
import EntityNotFoundPane from "pages/Editor/EntityNotFoundPane";
|
||||||
import type { ApplicationPayload } from "ee/constants/ReduxActionConstants";
|
import type { ApplicationPayload } from "ee/constants/ReduxActionConstants";
|
||||||
|
|
@ -88,9 +85,6 @@ class ApiEditor extends React.Component<Props> {
|
||||||
context!: React.ContextType<typeof ApiEditorContext>;
|
context!: React.ContextType<typeof ApiEditorContext>;
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
PerformanceTracker.stopTracking(PerformanceTransactionName.OPEN_ACTION, {
|
|
||||||
actionType: "API",
|
|
||||||
});
|
|
||||||
const type = this.getFormName();
|
const type = this.getFormName();
|
||||||
if (this.props.apiId) {
|
if (this.props.apiId) {
|
||||||
this.props.changeAPIPage(this.props.apiId, type === "SAAS");
|
this.props.changeAPIPage(this.props.apiId, type === "SAAS");
|
||||||
|
|
@ -109,9 +103,6 @@ class ApiEditor extends React.Component<Props> {
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidUpdate(prevProps: Props) {
|
componentDidUpdate(prevProps: Props) {
|
||||||
if (prevProps.isRunning && !this.props.isRunning) {
|
|
||||||
PerformanceTracker.stopTracking(PerformanceTransactionName.RUN_API_CLICK);
|
|
||||||
}
|
|
||||||
if (prevProps.apiId !== this.props.apiId) {
|
if (prevProps.apiId !== this.props.apiId) {
|
||||||
const type = this.getFormName();
|
const type = this.getFormName();
|
||||||
this.props.changeAPIPage(this.props.apiId || "", type === "SAAS");
|
this.props.changeAPIPage(this.props.apiId || "", type === "SAAS");
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,6 @@ import { useFeatureFlag } from "utils/hooks/useFeatureFlag";
|
||||||
import { ApiEditorContextProvider } from "./ApiEditorContext";
|
import { ApiEditorContextProvider } from "./ApiEditorContext";
|
||||||
import type { PaginationField } from "api/ActionAPI";
|
import type { PaginationField } from "api/ActionAPI";
|
||||||
import { get, keyBy } from "lodash";
|
import { get, keyBy } from "lodash";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import ConvertToModuleInstanceCTA from "ee/pages/Editor/EntityEditor/ConvertToModuleInstanceCTA";
|
import ConvertToModuleInstanceCTA from "ee/pages/Editor/EntityEditor/ConvertToModuleInstanceCTA";
|
||||||
import { MODULE_TYPE } from "ee/constants/ModuleConstants";
|
import { MODULE_TYPE } from "ee/constants/ModuleConstants";
|
||||||
import Disabler from "pages/common/Disabler";
|
import Disabler from "pages/common/Disabler";
|
||||||
|
|
@ -140,12 +137,6 @@ function ApiEditorWrapper(props: ApiEditorWrapperProps) {
|
||||||
const handleRunClick = useCallback(
|
const handleRunClick = useCallback(
|
||||||
(paginationField?: PaginationField) => {
|
(paginationField?: PaginationField) => {
|
||||||
const pluginName = plugins.find((plugin) => plugin.id === pluginId)?.name;
|
const pluginName = plugins.find((plugin) => plugin.id === pluginId)?.name;
|
||||||
PerformanceTracker.startTracking(
|
|
||||||
PerformanceTransactionName.RUN_API_CLICK,
|
|
||||||
{
|
|
||||||
apiId: action?.id,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
AnalyticsUtil.logEvent("RUN_API_CLICK", {
|
AnalyticsUtil.logEvent("RUN_API_CLICK", {
|
||||||
apiName,
|
apiName,
|
||||||
apiID: action?.id,
|
apiID: action?.id,
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,6 @@ import { useSelector } from "react-redux";
|
||||||
import Entity, { EntityClassNames } from "../Entity";
|
import Entity, { EntityClassNames } from "../Entity";
|
||||||
import ActionEntityContextMenu from "./ActionEntityContextMenu";
|
import ActionEntityContextMenu from "./ActionEntityContextMenu";
|
||||||
import history, { NavigationMethod } from "utils/history";
|
import history, { NavigationMethod } from "utils/history";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import {
|
import {
|
||||||
getActionByBaseId,
|
getActionByBaseId,
|
||||||
getDatasource,
|
getDatasource,
|
||||||
|
|
@ -70,9 +67,6 @@ export const ExplorerActionEntity = memo((props: ExplorerActionEntityProps) => {
|
||||||
const icon = config?.getIcon(action, pluginGroups[action.pluginId]);
|
const icon = config?.getIcon(action, pluginGroups[action.pluginId]);
|
||||||
|
|
||||||
const switchToAction = useCallback(() => {
|
const switchToAction = useCallback(() => {
|
||||||
PerformanceTracker.startTracking(PerformanceTransactionName.OPEN_ACTION, {
|
|
||||||
url,
|
|
||||||
});
|
|
||||||
url && history.push(url, { invokedBy: NavigationMethod.EntityExplorer });
|
url && history.push(url, { invokedBy: NavigationMethod.EntityExplorer });
|
||||||
AnalyticsUtil.logEvent("ENTITY_EXPLORER_CLICK", {
|
AnalyticsUtil.logEvent("ENTITY_EXPLORER_CLICK", {
|
||||||
type: "QUERIES/APIs",
|
type: "QUERIES/APIs",
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,6 @@ import React, { useCallback, useEffect } from "react";
|
||||||
import EntityProperty from "./EntityProperty";
|
import EntityProperty from "./EntityProperty";
|
||||||
|
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
import type { AppState } from "ee/reducers";
|
import type { AppState } from "ee/reducers";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
|
@ -50,15 +47,6 @@ export function EntityProperties() {
|
||||||
(state: AppState) => state.ui.widgetDragResize.lastSelectedWidget,
|
(state: AppState) => state.ui.widgetDragResize.lastSelectedWidget,
|
||||||
);
|
);
|
||||||
|
|
||||||
PerformanceTracker.startTracking(
|
|
||||||
PerformanceTransactionName.ENTITY_EXPLORER_ENTITY,
|
|
||||||
);
|
|
||||||
useEffect(() => {
|
|
||||||
PerformanceTracker.stopTracking(
|
|
||||||
PerformanceTransactionName.ENTITY_EXPLORER_ENTITY,
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.addEventListener("click", handleOutsideClick);
|
document.addEventListener("click", handleOutsideClick);
|
||||||
return () => document.removeEventListener("click", handleOutsideClick);
|
return () => document.removeEventListener("click", handleOutsideClick);
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
import React, { useRef, useCallback, useEffect } from "react";
|
import React, { useRef, useCallback, useEffect } from "react";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { NonIdealState, Classes } from "@blueprintjs/core";
|
import { NonIdealState, Classes } from "@blueprintjs/core";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
|
|
||||||
import { Colors } from "constants/Colors";
|
import { Colors } from "constants/Colors";
|
||||||
|
|
@ -66,10 +63,6 @@ const NoResult = styled(NonIdealState)`
|
||||||
|
|
||||||
function EntityExplorer({ isActive }: { isActive: boolean }) {
|
function EntityExplorer({ isActive }: { isActive: boolean }) {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
PerformanceTracker.startTracking(PerformanceTransactionName.ENTITY_EXPLORER);
|
|
||||||
useEffect(() => {
|
|
||||||
PerformanceTracker.stopTracking();
|
|
||||||
});
|
|
||||||
const explorerRef = useRef<HTMLDivElement | null>(null);
|
const explorerRef = useRef<HTMLDivElement | null>(null);
|
||||||
const isFirstTimeUserOnboardingEnabled = useSelector(
|
const isFirstTimeUserOnboardingEnabled = useSelector(
|
||||||
getIsFirstTimeUserOnboardingEnabled,
|
getIsFirstTimeUserOnboardingEnabled,
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,6 @@ import { PLUGIN_PACKAGE_DBS } from "constants/QueryEditorConstants";
|
||||||
import type { QueryAction, SaaSAction } from "entities/Action";
|
import type { QueryAction, SaaSAction } from "entities/Action";
|
||||||
import Spinner from "components/editorComponents/Spinner";
|
import Spinner from "components/editorComponents/Spinner";
|
||||||
import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper";
|
import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
||||||
import { initFormEvaluations } from "actions/evaluationActions";
|
import { initFormEvaluations } from "actions/evaluationActions";
|
||||||
import { getUIComponent } from "./helpers";
|
import { getUIComponent } from "./helpers";
|
||||||
|
|
@ -149,10 +146,6 @@ class QueryEditor extends React.Component<Props> {
|
||||||
this.props.setActionProperty(this.props.actionId, path, value);
|
this.props.setActionProperty(this.props.actionId, path, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PerformanceTracker.stopTracking(PerformanceTransactionName.OPEN_ACTION, {
|
|
||||||
actionType: "QUERY",
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleDeleteClick = () => {
|
handleDeleteClick = () => {
|
||||||
|
|
@ -169,10 +162,7 @@ class QueryEditor extends React.Component<Props> {
|
||||||
const pluginName = this.props.plugins.find(
|
const pluginName = this.props.plugins.find(
|
||||||
(plugin) => plugin.id === this.props.pluginId,
|
(plugin) => plugin.id === this.props.pluginId,
|
||||||
)?.name;
|
)?.name;
|
||||||
PerformanceTracker.startTracking(
|
|
||||||
PerformanceTransactionName.RUN_QUERY_CLICK,
|
|
||||||
{ actionId: this.props.actionId },
|
|
||||||
);
|
|
||||||
AnalyticsUtil.logEvent("RUN_QUERY_CLICK", {
|
AnalyticsUtil.logEvent("RUN_QUERY_CLICK", {
|
||||||
actionId: this.props.actionId,
|
actionId: this.props.actionId,
|
||||||
dataSourceSize: dataSources.length,
|
dataSourceSize: dataSources.length,
|
||||||
|
|
@ -186,11 +176,6 @@ class QueryEditor extends React.Component<Props> {
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidUpdate(prevProps: Props) {
|
componentDidUpdate(prevProps: Props) {
|
||||||
if (prevProps.isRunning === true && this.props.isRunning === false) {
|
|
||||||
PerformanceTracker.stopTracking(
|
|
||||||
PerformanceTransactionName.RUN_QUERY_CLICK,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// Update the page when the queryID is changed by changing the
|
// Update the page when the queryID is changed by changing the
|
||||||
// URL or selecting new query from the query pane
|
// URL or selecting new query from the query pane
|
||||||
// reusing same logic for changing query panes for switching query editor datasources, since the operations are similar.
|
// reusing same logic for changing query panes for switching query editor datasources, since the operations are similar.
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,6 @@ import {
|
||||||
getCurrentPageName,
|
getCurrentPageName,
|
||||||
} from "selectors/editorSelectors";
|
} from "selectors/editorSelectors";
|
||||||
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import { getCurrentApplication } from "ee/selectors/applicationSelectors";
|
import { getCurrentApplication } from "ee/selectors/applicationSelectors";
|
||||||
import { WidgetEditorContainer } from "./WidgetEditorContainer";
|
import { WidgetEditorContainer } from "./WidgetEditorContainer";
|
||||||
import { WidgetEditorHeader } from "./WidgetEditorHeader";
|
import { WidgetEditorHeader } from "./WidgetEditorHeader";
|
||||||
|
|
@ -27,10 +24,6 @@ function WidgetsEditor() {
|
||||||
const currentPageName = useSelector(getCurrentPageName);
|
const currentPageName = useSelector(getCurrentPageName);
|
||||||
const currentApp = useSelector(getCurrentApplication);
|
const currentApp = useSelector(getCurrentApplication);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
PerformanceTracker.stopTracking(PerformanceTransactionName.CLOSE_SIDE_PANE);
|
|
||||||
});
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (currentPageName !== undefined && currentPageId !== undefined) {
|
if (currentPageName !== undefined && currentPageId !== undefined) {
|
||||||
// Logging page load event
|
// Logging page load event
|
||||||
|
|
@ -43,7 +36,6 @@ function WidgetsEditor() {
|
||||||
}
|
}
|
||||||
}, [currentPageName, currentPageId]);
|
}, [currentPageName, currentPageId]);
|
||||||
|
|
||||||
PerformanceTracker.stopTracking();
|
|
||||||
return (
|
return (
|
||||||
<WidgetEditorContainer>
|
<WidgetEditorContainer>
|
||||||
<WidgetEditorHeader />
|
<WidgetEditorHeader />
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,6 @@ import {
|
||||||
} from "pages/UserAuth/StyledComponents";
|
} from "pages/UserAuth/StyledComponents";
|
||||||
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
||||||
import { LOGIN_SUBMIT_PATH } from "ee/constants/ApiConstants";
|
import { LOGIN_SUBMIT_PATH } from "ee/constants/ApiConstants";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import { getIsSafeRedirectURL } from "utils/helpers";
|
import { getIsSafeRedirectURL } from "utils/helpers";
|
||||||
import { getCurrentUser } from "selectors/usersSelectors";
|
import { getCurrentUser } from "selectors/usersSelectors";
|
||||||
import Container from "pages/UserAuth/Container";
|
import Container from "pages/UserAuth/Container";
|
||||||
|
|
@ -201,9 +198,6 @@ export function Login(props: LoginFormProps) {
|
||||||
isDisabled={!isFormValid}
|
isDisabled={!isFormValid}
|
||||||
kind="primary"
|
kind="primary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
PerformanceTracker.startTracking(
|
|
||||||
PerformanceTransactionName.LOGIN_CLICK,
|
|
||||||
);
|
|
||||||
AnalyticsUtil.logEvent("LOGIN_CLICK", {
|
AnalyticsUtil.logEvent("LOGIN_CLICK", {
|
||||||
loginMethod: "EMAIL",
|
loginMethod: "EMAIL",
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,6 @@ import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
||||||
import { SIGNUP_SUBMIT_PATH } from "ee/constants/ApiConstants";
|
import { SIGNUP_SUBMIT_PATH } from "ee/constants/ApiConstants";
|
||||||
import { connect, useSelector } from "react-redux";
|
import { connect, useSelector } from "react-redux";
|
||||||
import type { AppState } from "ee/reducers";
|
import type { AppState } from "ee/reducers";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
|
|
||||||
import { SIGNUP_FORM_EMAIL_FIELD_NAME } from "ee/constants/forms";
|
import { SIGNUP_FORM_EMAIL_FIELD_NAME } from "ee/constants/forms";
|
||||||
import { getAppsmithConfigs } from "ee/configs";
|
import { getAppsmithConfigs } from "ee/configs";
|
||||||
|
|
@ -261,9 +258,6 @@ export function SignUp(props: SignUpFormProps) {
|
||||||
AnalyticsUtil.logEvent("SIGNUP_CLICK", {
|
AnalyticsUtil.logEvent("SIGNUP_CLICK", {
|
||||||
signupMethod: "EMAIL",
|
signupMethod: "EMAIL",
|
||||||
});
|
});
|
||||||
PerformanceTracker.startTracking(
|
|
||||||
PerformanceTransactionName.SIGN_UP,
|
|
||||||
);
|
|
||||||
}}
|
}}
|
||||||
size="md"
|
size="md"
|
||||||
type="submit"
|
type="submit"
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,6 @@ import { getSocialLoginButtonProps } from "ee/utils/signupHelpers";
|
||||||
import type { EventName } from "ee/utils/analyticsUtilTypes";
|
import type { EventName } from "ee/utils/analyticsUtilTypes";
|
||||||
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import { Button } from "@appsmith/ads";
|
import { Button } from "@appsmith/ads";
|
||||||
import { isTenantConfig } from "ee/utils/adminSettingsHelpers";
|
import { isTenantConfig } from "ee/utils/adminSettingsHelpers";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
|
@ -63,12 +60,7 @@ function SocialLoginButton(props: {
|
||||||
if (props.type === "SIGNUP") {
|
if (props.type === "SIGNUP") {
|
||||||
eventName = "SIGNUP_CLICK";
|
eventName = "SIGNUP_CLICK";
|
||||||
}
|
}
|
||||||
PerformanceTracker.startTracking(
|
|
||||||
eventName === "SIGNUP_CLICK"
|
|
||||||
? PerformanceTransactionName.SIGN_UP
|
|
||||||
: PerformanceTransactionName.LOGIN_CLICK,
|
|
||||||
{ name: props.name.toUpperCase() },
|
|
||||||
);
|
|
||||||
AnalyticsUtil.logEvent(eventName, {
|
AnalyticsUtil.logEvent(eventName, {
|
||||||
loginMethod: props.name.toUpperCase(),
|
loginMethod: props.name.toUpperCase(),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,6 @@ import { useCallback } from "react";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { getCurrentUser } from "selectors/usersSelectors";
|
import { getCurrentUser } from "selectors/usersSelectors";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import UserWelcomeScreen from "pages/setup/UserWelcomeScreen";
|
import UserWelcomeScreen from "pages/setup/UserWelcomeScreen";
|
||||||
import { Center } from "pages/setup/common";
|
import { Center } from "pages/setup/common";
|
||||||
import { Spinner } from "@appsmith/ads";
|
import { Spinner } from "@appsmith/ads";
|
||||||
|
|
@ -27,7 +24,6 @@ export function SignupSuccess() {
|
||||||
const user = useSelector(getCurrentUser);
|
const user = useSelector(getCurrentUser);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
PerformanceTracker.stopTracking(PerformanceTransactionName.SIGN_UP);
|
|
||||||
user?.email && setUserSignedUpFlag(user?.email);
|
user?.email && setUserSignedUpFlag(user?.email);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,6 @@ import {
|
||||||
extractClientDefinedErrorMetadata,
|
extractClientDefinedErrorMetadata,
|
||||||
validateResponse,
|
validateResponse,
|
||||||
} from "sagas/ErrorSagas";
|
} from "sagas/ErrorSagas";
|
||||||
import type { EventName } from "ee/utils/analyticsUtilTypes";
|
|
||||||
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
||||||
import type { Action } from "entities/Action";
|
import type { Action } from "entities/Action";
|
||||||
import { ActionExecutionContext } from "entities/Action";
|
import { ActionExecutionContext } from "entities/Action";
|
||||||
|
|
@ -103,9 +102,6 @@ import {
|
||||||
getLayoutOnLoadActions,
|
getLayoutOnLoadActions,
|
||||||
getLayoutOnLoadIssues,
|
getLayoutOnLoadIssues,
|
||||||
} from "selectors/editorSelectors";
|
} from "selectors/editorSelectors";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import * as log from "loglevel";
|
import * as log from "loglevel";
|
||||||
import { EMPTY_RESPONSE } from "components/editorComponents/emptyResponse";
|
import { EMPTY_RESPONSE } from "components/editorComponents/emptyResponse";
|
||||||
import type { AppState } from "ee/reducers";
|
import type { AppState } from "ee/reducers";
|
||||||
|
|
@ -536,13 +532,6 @@ export default function* executePluginActionTriggerSaga(
|
||||||
getType(params),
|
getType(params),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.EXECUTE_ACTION,
|
|
||||||
{
|
|
||||||
actionId: actionId,
|
|
||||||
},
|
|
||||||
actionId,
|
|
||||||
);
|
|
||||||
|
|
||||||
setAttributesToSpan(span, {
|
setAttributesToSpan(span, {
|
||||||
actionId: actionId,
|
actionId: actionId,
|
||||||
|
|
@ -702,19 +691,9 @@ function* runActionShortcutSaga() {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!match || !match.params) return;
|
if (!match || !match.params) return;
|
||||||
const { baseApiId, basePageId, baseQueryId } = match.params;
|
const { baseApiId, baseQueryId } = match.params;
|
||||||
const actionId = baseApiId || baseQueryId;
|
const actionId = baseApiId || baseQueryId;
|
||||||
if (actionId) {
|
if (actionId) {
|
||||||
const trackerId = baseApiId
|
|
||||||
? PerformanceTransactionName.RUN_API_SHORTCUT
|
|
||||||
: PerformanceTransactionName.RUN_QUERY_SHORTCUT;
|
|
||||||
PerformanceTracker.startTracking(trackerId, {
|
|
||||||
actionId,
|
|
||||||
basePageId,
|
|
||||||
});
|
|
||||||
AnalyticsUtil.logEvent(trackerId as EventName, {
|
|
||||||
actionId,
|
|
||||||
});
|
|
||||||
yield put(runAction(actionId));
|
yield put(runAction(actionId));
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1207,13 +1186,6 @@ function* executePageLoadAction(
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.EXECUTE_ACTION,
|
|
||||||
{
|
|
||||||
failed: true,
|
|
||||||
},
|
|
||||||
pageAction.id,
|
|
||||||
);
|
|
||||||
AnalyticsUtil.logEvent("EXECUTE_ACTION_FAILURE", {
|
AnalyticsUtil.logEvent("EXECUTE_ACTION_FAILURE", {
|
||||||
type: pageAction.pluginType,
|
type: pageAction.pluginType,
|
||||||
name: actionName,
|
name: actionName,
|
||||||
|
|
@ -1256,11 +1228,6 @@ function* executePageLoadAction(
|
||||||
? actionExecutionContext
|
? actionExecutionContext
|
||||||
: ActionExecutionContext.PAGE_LOAD,
|
: ActionExecutionContext.PAGE_LOAD,
|
||||||
});
|
});
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.EXECUTE_ACTION,
|
|
||||||
undefined,
|
|
||||||
pageAction.id,
|
|
||||||
);
|
|
||||||
|
|
||||||
yield take(ReduxActionTypes.SET_EVALUATED_TREE);
|
yield take(ReduxActionTypes.SET_EVALUATED_TREE);
|
||||||
}
|
}
|
||||||
|
|
@ -1282,10 +1249,6 @@ function* executePageLoadActionsSaga(
|
||||||
setAttributesToSpan(span, { numActions: actionCount });
|
setAttributesToSpan(span, { numActions: actionCount });
|
||||||
// when cyclical depedency issue is there,
|
// when cyclical depedency issue is there,
|
||||||
// none of the page load actions would be executed
|
// none of the page load actions would be executed
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.EXECUTE_PAGE_LOAD_ACTIONS,
|
|
||||||
{ numActions: actionCount },
|
|
||||||
);
|
|
||||||
for (const actionSet of pageActions) {
|
for (const actionSet of pageActions) {
|
||||||
// Load all sets in parallel
|
// Load all sets in parallel
|
||||||
// @ts-expect-error: no idea how to type this
|
// @ts-expect-error: no idea how to type this
|
||||||
|
|
@ -1300,9 +1263,6 @@ function* executePageLoadActionsSaga(
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.EXECUTE_PAGE_LOAD_ACTIONS,
|
|
||||||
);
|
|
||||||
// We show errors in the debugger once onPageLoad actions
|
// We show errors in the debugger once onPageLoad actions
|
||||||
// are executed
|
// are executed
|
||||||
yield put(hideDebuggerErrors(false));
|
yield put(hideDebuggerErrors(false));
|
||||||
|
|
@ -1364,13 +1324,7 @@ function* executePluginActionSaga(
|
||||||
throw new UserCancelledActionExecutionError();
|
throw new UserCancelledActionExecutionError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.EXECUTE_ACTION,
|
|
||||||
{
|
|
||||||
actionId: actionId,
|
|
||||||
},
|
|
||||||
actionId,
|
|
||||||
);
|
|
||||||
yield put(executePluginActionRequest({ id: actionId }));
|
yield put(executePluginActionRequest({ id: actionId }));
|
||||||
|
|
||||||
const appMode: APP_MODE | undefined = yield select(getAppMode);
|
const appMode: APP_MODE | undefined = yield select(getAppMode);
|
||||||
|
|
@ -1415,9 +1369,6 @@ function* executePluginActionSaga(
|
||||||
response = yield ActionAPI.executeAction(formData, timeout, parentSpan);
|
response = yield ActionAPI.executeAction(formData, timeout, parentSpan);
|
||||||
|
|
||||||
const isError = isErrorResponse(response);
|
const isError = isErrorResponse(response);
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.EXECUTE_ACTION,
|
|
||||||
);
|
|
||||||
yield validateResponse(response);
|
yield validateResponse(response);
|
||||||
payload = createActionExecutionResponse(response);
|
payload = createActionExecutionResponse(response);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,9 +85,6 @@ import {
|
||||||
} from "ee/selectors/entitiesSelector";
|
} from "ee/selectors/entitiesSelector";
|
||||||
import history from "utils/history";
|
import history from "utils/history";
|
||||||
import { INTEGRATION_TABS } from "constants/routes";
|
import { INTEGRATION_TABS } from "constants/routes";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import {
|
import {
|
||||||
ACTION_COPY_SUCCESS,
|
ACTION_COPY_SUCCESS,
|
||||||
ACTION_MOVE_SUCCESS,
|
ACTION_MOVE_SUCCESS,
|
||||||
|
|
@ -395,10 +392,7 @@ export function* fetchActionsSaga(
|
||||||
action: EvaluationReduxAction<FetchActionsPayload>,
|
action: EvaluationReduxAction<FetchActionsPayload>,
|
||||||
) {
|
) {
|
||||||
const { applicationId, unpublishedActions } = action.payload;
|
const { applicationId, unpublishedActions } = action.payload;
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_ACTIONS_API,
|
|
||||||
{ mode: "EDITOR", appId: applicationId },
|
|
||||||
);
|
|
||||||
try {
|
try {
|
||||||
const response: ApiResponse<Action[]> = yield call(
|
const response: ApiResponse<Action[]> = yield call(
|
||||||
getFromServerWhenNoPrefetchedResult,
|
getFromServerWhenNoPrefetchedResult,
|
||||||
|
|
@ -413,19 +407,12 @@ export function* fetchActionsSaga(
|
||||||
payload: response.data,
|
payload: response.data,
|
||||||
postEvalActions: action.postEvalActions,
|
postEvalActions: action.postEvalActions,
|
||||||
});
|
});
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_ACTIONS_API,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
yield put({
|
yield put({
|
||||||
type: ReduxActionErrorTypes.FETCH_ACTIONS_ERROR,
|
type: ReduxActionErrorTypes.FETCH_ACTIONS_ERROR,
|
||||||
payload: { error },
|
payload: { error },
|
||||||
});
|
});
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_ACTIONS_API,
|
|
||||||
{ failed: true },
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -433,10 +420,7 @@ export function* fetchActionsForViewModeSaga(
|
||||||
action: ReduxAction<FetchActionsPayload>,
|
action: ReduxAction<FetchActionsPayload>,
|
||||||
) {
|
) {
|
||||||
const { applicationId, publishedActions } = action.payload;
|
const { applicationId, publishedActions } = action.payload;
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_ACTIONS_API,
|
|
||||||
{ mode: "VIEWER", appId: applicationId },
|
|
||||||
);
|
|
||||||
try {
|
try {
|
||||||
const response: ApiResponse<ActionViewMode[]> = yield call(
|
const response: ApiResponse<ActionViewMode[]> = yield call(
|
||||||
getFromServerWhenNoPrefetchedResult,
|
getFromServerWhenNoPrefetchedResult,
|
||||||
|
|
@ -464,18 +448,11 @@ export function* fetchActionsForViewModeSaga(
|
||||||
payload: response.responseMeta.error,
|
payload: response.responseMeta.error,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_ACTIONS_API,
|
|
||||||
);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
yield put({
|
yield put({
|
||||||
type: ReduxActionErrorTypes.FETCH_ACTIONS_VIEW_MODE_ERROR,
|
type: ReduxActionErrorTypes.FETCH_ACTIONS_VIEW_MODE_ERROR,
|
||||||
payload: { error },
|
payload: { error },
|
||||||
});
|
});
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_ACTIONS_API,
|
|
||||||
{ failed: true },
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -483,10 +460,7 @@ export function* fetchActionsForPageSaga(
|
||||||
action: EvaluationReduxAction<{ pageId: string }>,
|
action: EvaluationReduxAction<{ pageId: string }>,
|
||||||
) {
|
) {
|
||||||
const { pageId } = action.payload;
|
const { pageId } = action.payload;
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_PAGE_ACTIONS_API,
|
|
||||||
{ pageId: pageId },
|
|
||||||
);
|
|
||||||
try {
|
try {
|
||||||
const response: ApiResponse<Action[]> = yield call(
|
const response: ApiResponse<Action[]> = yield call(
|
||||||
ActionAPI.fetchActionsByPageId,
|
ActionAPI.fetchActionsByPageId,
|
||||||
|
|
@ -495,16 +469,8 @@ export function* fetchActionsForPageSaga(
|
||||||
const isValidResponse: boolean = yield validateResponse(response);
|
const isValidResponse: boolean = yield validateResponse(response);
|
||||||
if (isValidResponse) {
|
if (isValidResponse) {
|
||||||
yield put(fetchActionsForPageSuccess(response.data));
|
yield put(fetchActionsForPageSuccess(response.data));
|
||||||
// wait for success of
|
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_PAGE_ACTIONS_API,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.FETCH_PAGE_ACTIONS_API,
|
|
||||||
{ failed: true },
|
|
||||||
);
|
|
||||||
yield put({
|
yield put({
|
||||||
type: ReduxActionErrorTypes.FETCH_ACTIONS_FOR_PAGE_ERROR,
|
type: ReduxActionErrorTypes.FETCH_ACTIONS_FOR_PAGE_ERROR,
|
||||||
payload: { error },
|
payload: { error },
|
||||||
|
|
@ -514,11 +480,6 @@ export function* fetchActionsForPageSaga(
|
||||||
|
|
||||||
export function* updateActionSaga(actionPayload: ReduxAction<{ id: string }>) {
|
export function* updateActionSaga(actionPayload: ReduxAction<{ id: string }>) {
|
||||||
try {
|
try {
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.UPDATE_ACTION_API,
|
|
||||||
{ actionid: actionPayload.payload.id },
|
|
||||||
);
|
|
||||||
|
|
||||||
let action: Action = yield select(getAction, actionPayload.payload.id);
|
let action: Action = yield select(getAction, actionPayload.payload.id);
|
||||||
if (!action) throw new Error("Could not find action to update");
|
if (!action) throw new Error("Could not find action to update");
|
||||||
|
|
||||||
|
|
@ -571,20 +532,12 @@ export function* updateActionSaga(actionPayload: ReduxAction<{ id: string }>) {
|
||||||
pageName,
|
pageName,
|
||||||
});
|
});
|
||||||
|
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.UPDATE_ACTION_API,
|
|
||||||
);
|
|
||||||
|
|
||||||
yield put(updateActionSuccess({ data: response.data }));
|
yield put(updateActionSuccess({ data: response.data }));
|
||||||
checkAndLogErrorsIfCyclicDependency(
|
checkAndLogErrorsIfCyclicDependency(
|
||||||
(response.data as Action).errorReports,
|
(response.data as Action).errorReports,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.UPDATE_ACTION_API,
|
|
||||||
{ failed: true },
|
|
||||||
);
|
|
||||||
yield put({
|
yield put({
|
||||||
type: ReduxActionErrorTypes.UPDATE_ACTION_ERROR,
|
type: ReduxActionErrorTypes.UPDATE_ACTION_ERROR,
|
||||||
payload: { error, id: actionPayload.payload.id, show: false },
|
payload: { error, id: actionPayload.payload.id, show: false },
|
||||||
|
|
@ -857,12 +810,6 @@ export function* refactorActionName(
|
||||||
oldName: string,
|
oldName: string,
|
||||||
newName: string,
|
newName: string,
|
||||||
) {
|
) {
|
||||||
// fetch page of the action
|
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.REFACTOR_ACTION_NAME,
|
|
||||||
{ actionId: id },
|
|
||||||
);
|
|
||||||
|
|
||||||
const params: FetchPageRequest = { pageId, migrateDSL: true };
|
const params: FetchPageRequest = { pageId, migrateDSL: true };
|
||||||
const pageResponse: FetchPageResponse = yield call(PageApi.fetchPage, params);
|
const pageResponse: FetchPageResponse = yield call(PageApi.fetchPage, params);
|
||||||
// check if page request is successful
|
// check if page request is successful
|
||||||
|
|
@ -884,10 +831,6 @@ export function* refactorActionName(
|
||||||
|
|
||||||
const currentPageId: string = yield select(getCurrentPageId);
|
const currentPageId: string = yield select(getCurrentPageId);
|
||||||
|
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.REFACTOR_ACTION_NAME,
|
|
||||||
{ isSuccess: isRefactorSuccessful },
|
|
||||||
);
|
|
||||||
if (isRefactorSuccessful) {
|
if (isRefactorSuccessful) {
|
||||||
yield put({
|
yield put({
|
||||||
type: ReduxActionTypes.SAVE_ACTION_NAME_SUCCESS,
|
type: ReduxActionTypes.SAVE_ACTION_NAME_SUCCESS,
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,6 @@ import type {
|
||||||
import { PluginPackageName, PluginType } from "entities/Action";
|
import { PluginPackageName, PluginType } from "entities/Action";
|
||||||
import { getCurrentWorkspaceId } from "ee/selectors/selectedWorkspaceSelectors";
|
import { getCurrentWorkspaceId } from "ee/selectors/selectedWorkspaceSelectors";
|
||||||
import log from "loglevel";
|
import log from "loglevel";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import type { EventLocation } from "ee/utils/analyticsUtilTypes";
|
import type { EventLocation } from "ee/utils/analyticsUtilTypes";
|
||||||
import { createMessage, ERROR_ACTION_RENAME_FAIL } from "ee/constants/messages";
|
import { createMessage, ERROR_ACTION_RENAME_FAIL } from "ee/constants/messages";
|
||||||
import {
|
import {
|
||||||
|
|
@ -97,7 +94,6 @@ function* syncApiParamsSaga(
|
||||||
//Payload here contains the path and query params of a typical url like https://{domain}/{path}?{query_params}
|
//Payload here contains the path and query params of a typical url like https://{domain}/{path}?{query_params}
|
||||||
const value = actionPayload.payload;
|
const value = actionPayload.payload;
|
||||||
// Regular expression to find the query params group
|
// Regular expression to find the query params group
|
||||||
PerformanceTracker.startTracking(PerformanceTransactionName.SYNC_PARAMS_SAGA);
|
|
||||||
if (field === "actionConfiguration.path") {
|
if (field === "actionConfiguration.path") {
|
||||||
const params = parseUrlForQueryParams(value);
|
const params = parseUrlForQueryParams(value);
|
||||||
// before updating the query parameters make sure the path field changes have been successfully updated first
|
// before updating the query parameters make sure the path field changes have been successfully updated first
|
||||||
|
|
@ -135,7 +131,6 @@ function* syncApiParamsSaga(
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
PerformanceTracker.stopTracking();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function* handleUpdateBodyContentType(
|
function* handleUpdateBodyContentType(
|
||||||
|
|
@ -293,7 +288,6 @@ function* changeApiSaga(
|
||||||
action?: Action;
|
action?: Action;
|
||||||
}>,
|
}>,
|
||||||
) {
|
) {
|
||||||
PerformanceTracker.startTracking(PerformanceTransactionName.CHANGE_API_SAGA);
|
|
||||||
const { id, isSaas } = actionPayload.payload;
|
const { id, isSaas } = actionPayload.payload;
|
||||||
let { action } = actionPayload.payload;
|
let { action } = actionPayload.payload;
|
||||||
if (!action) action = yield select(getAction, id);
|
if (!action) action = yield select(getAction, id);
|
||||||
|
|
@ -329,7 +323,6 @@ function* changeApiSaga(
|
||||||
getFormData,
|
getFormData,
|
||||||
API_EDITOR_FORM_NAME,
|
API_EDITOR_FORM_NAME,
|
||||||
);
|
);
|
||||||
PerformanceTracker.stopTracking();
|
|
||||||
yield put(updateReplayEntity(id, actionPostProcess, ENTITY_TYPE.ACTION));
|
yield put(updateReplayEntity(id, actionPostProcess, ENTITY_TYPE.ACTION));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,6 @@ import { PropertyEvaluationErrorType } from "utils/DynamicBindingUtils";
|
||||||
import { EVAL_WORKER_ACTIONS } from "ee/workers/Evaluation/evalWorkerActions";
|
import { EVAL_WORKER_ACTIONS } from "ee/workers/Evaluation/evalWorkerActions";
|
||||||
import log from "loglevel";
|
import log from "loglevel";
|
||||||
import type { WidgetProps } from "widgets/BaseWidget";
|
import type { WidgetProps } from "widgets/BaseWidget";
|
||||||
import PerformanceTracker, {
|
|
||||||
PerformanceTransactionName,
|
|
||||||
} from "utils/PerformanceTracker";
|
|
||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
import type { Action } from "redux";
|
import type { Action } from "redux";
|
||||||
import {
|
import {
|
||||||
|
|
@ -162,13 +159,6 @@ export function* updateDataTreeHandler(
|
||||||
|
|
||||||
const appMode: ReturnType<typeof getAppMode> = yield select(getAppMode);
|
const appMode: ReturnType<typeof getAppMode> = yield select(getAppMode);
|
||||||
|
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.DATA_TREE_EVALUATION,
|
|
||||||
);
|
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.SET_EVALUATED_TREE,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!isEmpty(staleMetaIds)) {
|
if (!isEmpty(staleMetaIds)) {
|
||||||
yield put(resetWidgetsMetaState(staleMetaIds));
|
yield put(resetWidgetsMetaState(staleMetaIds));
|
||||||
}
|
}
|
||||||
|
|
@ -177,10 +167,6 @@ export function* updateDataTreeHandler(
|
||||||
|
|
||||||
ConfigTreeActions.setConfigTree(configTree);
|
ConfigTreeActions.setConfigTree(configTree);
|
||||||
|
|
||||||
PerformanceTracker.stopAsyncTracking(
|
|
||||||
PerformanceTransactionName.SET_EVALUATED_TREE,
|
|
||||||
);
|
|
||||||
|
|
||||||
// if evalMetaUpdates are present only then dispatch updateMetaState
|
// if evalMetaUpdates are present only then dispatch updateMetaState
|
||||||
if (evalMetaUpdates.length) {
|
if (evalMetaUpdates.length) {
|
||||||
yield put(updateMetaState(evalMetaUpdates));
|
yield put(updateMetaState(evalMetaUpdates));
|
||||||
|
|
@ -267,9 +253,7 @@ export function* evaluateTreeSaga(
|
||||||
const theme: ReturnType<typeof getSelectedAppTheme> =
|
const theme: ReturnType<typeof getSelectedAppTheme> =
|
||||||
yield select(getSelectedAppTheme);
|
yield select(getSelectedAppTheme);
|
||||||
log.debug({ unevalTree, configTree: unEvalAndConfigTree.configTree });
|
log.debug({ unevalTree, configTree: unEvalAndConfigTree.configTree });
|
||||||
PerformanceTracker.startAsyncTracking(
|
|
||||||
PerformanceTransactionName.DATA_TREE_EVALUATION,
|
|
||||||
);
|
|
||||||
const appMode: ReturnType<typeof getAppMode> = yield select(getAppMode);
|
const appMode: ReturnType<typeof getAppMode> = yield select(getAppMode);
|
||||||
const widgetsMeta: ReturnType<typeof getWidgetsMeta> =
|
const widgetsMeta: ReturnType<typeof getWidgetsMeta> =
|
||||||
yield select(getWidgetsMeta);
|
yield select(getWidgetsMeta);
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,6 @@ export function* startAppEngine(action: ReduxAction<AppEnginePayload>) {
|
||||||
action.payload.mode,
|
action.payload.mode,
|
||||||
action.payload.mode,
|
action.payload.mode,
|
||||||
);
|
);
|
||||||
engine.startPerformanceTracking();
|
|
||||||
yield call(engine.setupEngine, action.payload, rootSpan);
|
yield call(engine.setupEngine, action.payload, rootSpan);
|
||||||
|
|
||||||
const getInitResponsesSpan = startNestedSpan(
|
const getInitResponsesSpan = startNestedSpan(
|
||||||
|
|
@ -344,7 +343,6 @@ export function* startAppEngine(action: ReduxAction<AppEnginePayload>) {
|
||||||
yield call(engine.loadGit, applicationId, rootSpan);
|
yield call(engine.loadGit, applicationId, rootSpan);
|
||||||
yield call(engine.completeChore, rootSpan);
|
yield call(engine.completeChore, rootSpan);
|
||||||
yield put(generateAutoHeightLayoutTreeAction(true, false));
|
yield put(generateAutoHeightLayoutTreeAction(true, false));
|
||||||
engine.stopPerformanceTracking();
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log.error(e);
|
log.error(e);
|
||||||
if (e instanceof AppEngineApiError) return;
|
if (e instanceof AppEngineApiError) return;
|
||||||
|
|
|
||||||
|
|
@ -1,281 +0,0 @@
|
||||||
import * as Sentry from "@sentry/react";
|
|
||||||
import type { Span } from "@sentry/tracing";
|
|
||||||
import { SpanStatus } from "@sentry/tracing";
|
|
||||||
import { getAppsmithConfigs } from "ee/configs";
|
|
||||||
import _ from "lodash";
|
|
||||||
import * as log from "loglevel";
|
|
||||||
|
|
||||||
export enum PerformanceTransactionName {
|
|
||||||
DATA_TREE_EVALUATION = "DATA_TREE_EVALUATION",
|
|
||||||
SET_EVALUATED_TREE = "SET_EVALUATED_TREE",
|
|
||||||
EXECUTE_PAGE_LOAD_ACTIONS = "EXECUTE_PAGE_LOAD_ACTIONS",
|
|
||||||
ENTITY_EXPLORER_ENTITY = "ENTITY_EXPLORER_ENTITY",
|
|
||||||
ENTITY_EXPLORER = "ENTITY_EXPLORER",
|
|
||||||
CLOSE_SIDE_PANE = "CLOSE_SIDE_PANE",
|
|
||||||
OPEN_ACTION = "OPEN_ACTION",
|
|
||||||
SIDE_BAR_MOUNT = "SIDE_BAR_MOUNT",
|
|
||||||
EXECUTE_ACTION = "EXECUTE_ACTION",
|
|
||||||
CHANGE_API_SAGA = "CHANGE_API_SAGA",
|
|
||||||
SYNC_PARAMS_SAGA = "SYNC_PARAMS_SAGA",
|
|
||||||
RUN_API_CLICK = "RUN_API_CLICK",
|
|
||||||
RUN_API_SHORTCUT = "RUN_API_SHORTCUT",
|
|
||||||
RUN_QUERY_CLICK = "RUN_QUERY_CLICK",
|
|
||||||
RUN_QUERY_SHORTCUT = "RUN_QUERY_SHORTCUT",
|
|
||||||
FETCH_ACTIONS_API = "FETCH_ACTIONS_API",
|
|
||||||
FETCH_PAGE_LIST_API = "FETCH_PAGE_LIST_API",
|
|
||||||
FETCH_PAGE_ACTIONS_API = "FETCH_PAGE_ACTIONS_API",
|
|
||||||
FETCH_PAGE_API = "FETCH_PAGE_API",
|
|
||||||
SAVE_PAGE_API = "SAVE_PAGE_API",
|
|
||||||
UPDATE_ACTION_API = "UPDATE_ACTION_API",
|
|
||||||
OPEN_PROPERTY_PANE = "OPEN_PROPERTY_PANE",
|
|
||||||
REFACTOR_ACTION_NAME = "REFACTOR_ACTION_NAME",
|
|
||||||
USER_ME_API = "USER_ME_API",
|
|
||||||
SIGN_UP = "SIGN_UP",
|
|
||||||
LOGIN_CLICK = "LOGIN_CLICK",
|
|
||||||
INIT_EDIT_APP = "INIT_EDIT_APP",
|
|
||||||
INIT_VIEW_APP = "INIT_VIEW_APP",
|
|
||||||
SHOW_RESIZE_HANDLES = "SHOW_RESIZE_HANDLES",
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface PerfTag {
|
|
||||||
name: string;
|
|
||||||
value: string;
|
|
||||||
}
|
|
||||||
export interface PerfLog {
|
|
||||||
sentrySpan: Span;
|
|
||||||
skipLog?: boolean;
|
|
||||||
eventName: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const appsmithConfigs = getAppsmithConfigs();
|
|
||||||
|
|
||||||
class PerformanceTracker {
|
|
||||||
private static perfLogQueue: PerfLog[] = [];
|
|
||||||
private static perfAsyncMap: Map<string, PerfLog> = new Map();
|
|
||||||
|
|
||||||
static startTracking = (
|
|
||||||
eventName: PerformanceTransactionName,
|
|
||||||
// TODO: Fix this the next time the file is edited
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
data?: any,
|
|
||||||
skipLog = false,
|
|
||||||
tags: Array<PerfTag> = [],
|
|
||||||
) => {
|
|
||||||
if (appsmithConfigs.sentry.enabled) {
|
|
||||||
const currentTransaction = Sentry.getCurrentHub()
|
|
||||||
.getScope()
|
|
||||||
?.getTransaction();
|
|
||||||
if (
|
|
||||||
PerformanceTracker.perfLogQueue.length === 0 &&
|
|
||||||
currentTransaction !== undefined &&
|
|
||||||
currentTransaction.status === SpanStatus.Ok
|
|
||||||
) {
|
|
||||||
PerformanceTracker.perfLogQueue.push({
|
|
||||||
sentrySpan: currentTransaction,
|
|
||||||
skipLog: skipLog,
|
|
||||||
eventName: eventName,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (PerformanceTracker.perfLogQueue.length === 0) {
|
|
||||||
if (!skipLog) {
|
|
||||||
log.debug(
|
|
||||||
PerformanceTracker.generateSpaces(
|
|
||||||
PerformanceTracker.perfLogQueue.length + 1,
|
|
||||||
) +
|
|
||||||
eventName +
|
|
||||||
" Track Transaction ",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
const newTransaction = Sentry.startTransaction({ name: eventName });
|
|
||||||
|
|
||||||
tags.forEach(({ name: tagName, value }) => {
|
|
||||||
newTransaction.setTag(tagName, value);
|
|
||||||
});
|
|
||||||
|
|
||||||
newTransaction.setData("startData", data);
|
|
||||||
Sentry.getCurrentHub().configureScope((scope) =>
|
|
||||||
scope.setSpan(newTransaction),
|
|
||||||
);
|
|
||||||
PerformanceTracker.perfLogQueue.push({
|
|
||||||
sentrySpan: newTransaction,
|
|
||||||
skipLog: skipLog,
|
|
||||||
eventName: eventName,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
if (!skipLog) {
|
|
||||||
log.debug(
|
|
||||||
PerformanceTracker.generateSpaces(
|
|
||||||
PerformanceTracker.perfLogQueue.length + 1,
|
|
||||||
) +
|
|
||||||
eventName +
|
|
||||||
" Track Span ",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
const currentPerfLog =
|
|
||||||
PerformanceTracker.perfLogQueue[
|
|
||||||
PerformanceTracker.perfLogQueue.length - 1
|
|
||||||
];
|
|
||||||
const currentRunningSpan = currentPerfLog.sentrySpan;
|
|
||||||
const span = currentRunningSpan.startChild({
|
|
||||||
op: eventName,
|
|
||||||
data: data,
|
|
||||||
});
|
|
||||||
PerformanceTracker.perfLogQueue.push({
|
|
||||||
sentrySpan: span,
|
|
||||||
skipLog: skipLog,
|
|
||||||
eventName: eventName,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static stopTracking = (
|
|
||||||
eventName?: PerformanceTransactionName,
|
|
||||||
// TODO: Fix this the next time the file is edited
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
data?: any,
|
|
||||||
) => {
|
|
||||||
if (appsmithConfigs.sentry.enabled) {
|
|
||||||
if (eventName) {
|
|
||||||
const index = _.findLastIndex(
|
|
||||||
PerformanceTracker.perfLogQueue,
|
|
||||||
(perfLog) => {
|
|
||||||
return perfLog.eventName === eventName;
|
|
||||||
},
|
|
||||||
);
|
|
||||||
if (index !== -1) {
|
|
||||||
for (
|
|
||||||
let i = PerformanceTracker.perfLogQueue.length - 1;
|
|
||||||
i >= index;
|
|
||||||
i--
|
|
||||||
) {
|
|
||||||
const perfLog = PerformanceTracker.perfLogQueue.pop();
|
|
||||||
if (perfLog) {
|
|
||||||
const currentSpan = perfLog.sentrySpan;
|
|
||||||
currentSpan.finish();
|
|
||||||
if (!perfLog?.skipLog) {
|
|
||||||
PerformanceTracker.printDuration(
|
|
||||||
perfLog.eventName,
|
|
||||||
i + 1,
|
|
||||||
currentSpan.startTimestamp,
|
|
||||||
currentSpan.endTimestamp,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
const perfLog = PerformanceTracker.perfLogQueue.pop();
|
|
||||||
if (perfLog) {
|
|
||||||
const currentRunningSpan = perfLog?.sentrySpan;
|
|
||||||
currentRunningSpan.setData("endData", data);
|
|
||||||
currentRunningSpan.finish();
|
|
||||||
if (!perfLog?.skipLog) {
|
|
||||||
PerformanceTracker.printDuration(
|
|
||||||
perfLog.eventName,
|
|
||||||
PerformanceTracker.perfLogQueue.length + 1,
|
|
||||||
currentRunningSpan.startTimestamp,
|
|
||||||
currentRunningSpan.endTimestamp,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static startAsyncTracking = (
|
|
||||||
eventName: PerformanceTransactionName,
|
|
||||||
// TODO: Fix this the next time the file is edited
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
data?: any,
|
|
||||||
uniqueId?: string,
|
|
||||||
parentEventId?: string,
|
|
||||||
skipLog = false,
|
|
||||||
) => {
|
|
||||||
if (!skipLog) {
|
|
||||||
log.debug(
|
|
||||||
"Async " +
|
|
||||||
PerformanceTracker.generateSpaces(0) +
|
|
||||||
eventName +
|
|
||||||
" Track Transaction ",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (!parentEventId) {
|
|
||||||
const newTransaction = Sentry.startTransaction({ name: eventName });
|
|
||||||
newTransaction.setData("startData", data);
|
|
||||||
PerformanceTracker.perfAsyncMap.set(uniqueId ? uniqueId : eventName, {
|
|
||||||
sentrySpan: newTransaction,
|
|
||||||
eventName: eventName,
|
|
||||||
skipLog: skipLog,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
const perfLog = PerformanceTracker.perfAsyncMap.get(parentEventId);
|
|
||||||
const childSpan = perfLog?.sentrySpan.startChild({
|
|
||||||
op: eventName,
|
|
||||||
data: data,
|
|
||||||
});
|
|
||||||
if (childSpan) {
|
|
||||||
PerformanceTracker.perfAsyncMap.set(uniqueId ? uniqueId : eventName, {
|
|
||||||
sentrySpan: childSpan,
|
|
||||||
eventName: eventName,
|
|
||||||
skipLog: skipLog,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static stopAsyncTracking(
|
|
||||||
eventName: PerformanceTransactionName,
|
|
||||||
// TODO: Fix this the next time the file is edited
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
data?: any,
|
|
||||||
uniqueId?: string,
|
|
||||||
) {
|
|
||||||
const perfLog = PerformanceTracker.perfAsyncMap.get(
|
|
||||||
uniqueId ? uniqueId : eventName,
|
|
||||||
);
|
|
||||||
if (perfLog) {
|
|
||||||
const currentSpan = perfLog.sentrySpan;
|
|
||||||
currentSpan.setData("endData", data);
|
|
||||||
currentSpan.finish();
|
|
||||||
if (!perfLog?.skipLog) {
|
|
||||||
PerformanceTracker.printDuration(
|
|
||||||
perfLog.eventName,
|
|
||||||
0,
|
|
||||||
currentSpan.startTimestamp,
|
|
||||||
currentSpan.endTimestamp,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static generateSpaces(num: number) {
|
|
||||||
let str = "";
|
|
||||||
for (let i = 0; i < num; i++) {
|
|
||||||
str += "\t";
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
static printDuration(
|
|
||||||
eventName: string,
|
|
||||||
level: number,
|
|
||||||
startTime: number,
|
|
||||||
endTime?: number,
|
|
||||||
isAsync?: boolean,
|
|
||||||
) {
|
|
||||||
const duration = ((endTime || 0) - startTime) * 1000;
|
|
||||||
const spaces = PerformanceTracker.generateSpaces(level);
|
|
||||||
log.debug(
|
|
||||||
(isAsync ? "Async " : "") +
|
|
||||||
spaces +
|
|
||||||
eventName +
|
|
||||||
" Finish Tracking in " +
|
|
||||||
duration +
|
|
||||||
"ms",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default PerformanceTracker;
|
|
||||||
|
|
@ -8473,19 +8473,6 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@sentry/tracing@npm:^6.2.4":
|
|
||||||
version: 6.2.4
|
|
||||||
resolution: "@sentry/tracing@npm:6.2.4"
|
|
||||||
dependencies:
|
|
||||||
"@sentry/hub": 6.2.4
|
|
||||||
"@sentry/minimal": 6.2.4
|
|
||||||
"@sentry/types": 6.2.4
|
|
||||||
"@sentry/utils": 6.2.4
|
|
||||||
tslib: ^1.9.3
|
|
||||||
checksum: 74fb1cf110e10fda9b5eac1c7e0eb92204311d336bcd30642a33fde3a3a0fd73ed8d13ea62e744059adf6bb84d638ec5a35e8d2b40af2f5ff3131c0fb70017a5
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"@sentry/types@npm:6.2.4":
|
"@sentry/types@npm:6.2.4":
|
||||||
version: 6.2.4
|
version: 6.2.4
|
||||||
resolution: "@sentry/types@npm:6.2.4"
|
resolution: "@sentry/types@npm:6.2.4"
|
||||||
|
|
@ -13197,7 +13184,6 @@ __metadata:
|
||||||
"@react-types/shared": ^3.23.0
|
"@react-types/shared": ^3.23.0
|
||||||
"@redux-saga/testing-utils": ^1.1.5
|
"@redux-saga/testing-utils": ^1.1.5
|
||||||
"@sentry/react": ^6.2.4
|
"@sentry/react": ^6.2.4
|
||||||
"@sentry/tracing": ^6.2.4
|
|
||||||
"@sentry/webpack-plugin": ^1.18.9
|
"@sentry/webpack-plugin": ^1.18.9
|
||||||
"@shared/ast": "workspace:^"
|
"@shared/ast": "workspace:^"
|
||||||
"@shared/dsl": "workspace:^"
|
"@shared/dsl": "workspace:^"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user