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
This commit is contained in:
Rishabh Rathod 2023-08-02 13:18:09 +05:30 committed by GitHub
parent f62ea28807
commit b93dcc4b84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<Log[]>) {
const currentDebuggerErrors: Record<string, Log> = yield select(
getDebuggerErrors,
);
const appMode: ReturnType<typeof getAppMode> = 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<Log[]>) {
...analyticsPayload,
eventName: "DEBUGGER_NEW_ERROR",
errorMessages,
appMode,
},
});
@ -498,6 +501,7 @@ function* addDebuggerErrorLogsSaga(action: ReduxAction<Log[]>) {
errorMessage: errorMessage.message,
errorType: errorMessage.type,
errorSubType: errorMessage.subType,
appMode,
},
}),
),
@ -529,6 +533,7 @@ function* addDebuggerErrorLogsSaga(action: ReduxAction<Log[]>) {
errorMessage: updatedErrorMessage.message,
errorType: updatedErrorMessage.type,
errorSubType: updatedErrorMessage.subType,
appMode,
},
});
}
@ -560,6 +565,7 @@ function* addDebuggerErrorLogsSaga(action: ReduxAction<Log[]>) {
errorMessage: existingErrorMessage.message,
errorType: existingErrorMessage.type,
errorSubType: existingErrorMessage.subType,
appMode,
},
});
}
@ -576,6 +582,7 @@ function* deleteDebuggerErrorLogsSaga(
const currentDebuggerErrors: Record<string, Log> = yield select(
getDebuggerErrors,
);
const appMode: ReturnType<typeof getAppMode> = 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,
},
});
}),