From b93dcc4b8434212275d223e86fec9bb96f3707f5 Mon Sep 17 00:00:00 2001 From: Rishabh Rathod Date: Wed, 2 Aug 2023 13:18:09 +0530 Subject: [PATCH] chore: Add appmode in debugger analytics (#25842) ## Description Add Appmode in debugger analytics #### PR fixes following issue(s) Fixes #25730 #### Type of change - Chore ## Testing > #### How Has This Been Tested? #### Test Plan #### Issues raised during DP testing ## Checklist: #### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed --- app/client/src/sagas/DebuggerSagas.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/client/src/sagas/DebuggerSagas.ts b/app/client/src/sagas/DebuggerSagas.ts index 7189100d60..e58d30f38c 100644 --- a/app/client/src/sagas/DebuggerSagas.ts +++ b/app/client/src/sagas/DebuggerSagas.ts @@ -28,6 +28,7 @@ import { getAction, getPlugin, getJSCollection, + getAppMode, } from "selectors/entitiesSelector"; import type { Action } from "entities/Action"; import { PluginType } from "entities/Action"; @@ -455,6 +456,7 @@ function* addDebuggerErrorLogsSaga(action: ReduxAction) { const currentDebuggerErrors: Record = yield select( getDebuggerErrors, ); + const appMode: ReturnType = yield select(getAppMode); yield put(debuggerLogInit(errorLogs)); const validErrorLogs = errorLogs.filter((log) => log.source && log.id); if (isEmpty(validErrorLogs)) return; @@ -479,6 +481,7 @@ function* addDebuggerErrorLogsSaga(action: ReduxAction) { ...analyticsPayload, eventName: "DEBUGGER_NEW_ERROR", errorMessages, + appMode, }, }); @@ -498,6 +501,7 @@ function* addDebuggerErrorLogsSaga(action: ReduxAction) { errorMessage: errorMessage.message, errorType: errorMessage.type, errorSubType: errorMessage.subType, + appMode, }, }), ), @@ -529,6 +533,7 @@ function* addDebuggerErrorLogsSaga(action: ReduxAction) { errorMessage: updatedErrorMessage.message, errorType: updatedErrorMessage.type, errorSubType: updatedErrorMessage.subType, + appMode, }, }); } @@ -560,6 +565,7 @@ function* addDebuggerErrorLogsSaga(action: ReduxAction) { errorMessage: existingErrorMessage.message, errorType: existingErrorMessage.type, errorSubType: existingErrorMessage.subType, + appMode, }, }); } @@ -576,6 +582,7 @@ function* deleteDebuggerErrorLogsSaga( const currentDebuggerErrors: Record = yield select( getDebuggerErrors, ); + const appMode: ReturnType = yield select(getAppMode); const existingErrorPayloads = payload.filter((item) => currentDebuggerErrors.hasOwnProperty(item.id), ); @@ -606,6 +613,7 @@ function* deleteDebuggerErrorLogsSaga( ...analyticsPayload, eventName: "DEBUGGER_RESOLVED_ERROR", errorMessages, + appMode, }, }); @@ -624,6 +632,7 @@ function* deleteDebuggerErrorLogsSaga( errorMessage: errorMessage.message, errorType: errorMessage.type, errorSubType: errorMessage.subType, + appMode, }, }); }),