Merge pull request #2094 from appsmithorg/fix/sentry-errors

Prune expensive redux actions and console logs from sentry
This commit is contained in:
Nikhil Nandagopal 2020-12-09 13:06:54 +05:30 committed by GitHub
commit 854d514359
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -138,7 +138,7 @@ export function* errorSaga(
function logErrorSaga(action: ReduxAction<{ error: ErrorPayloadType }>) {
log.debug(`Error in action ${action.type}`);
log.error(action.payload.error);
if (action.payload) log.error(action.payload.error);
}
function showAlertAboutError(message: string) {

View File

@ -46,7 +46,23 @@ export const appInitializer = () => {
FeatureFlag.initialize(appsmithConfigs.featureFlag);
if (appsmithConfigs.sentry.enabled) {
Sentry.init(appsmithConfigs.sentry);
Sentry.init({
...appsmithConfigs.sentry,
beforeBreadcrumb(breadcrumb, hint) {
if (breadcrumb.category === "console" && breadcrumb.level !== "error") {
return null;
}
if (breadcrumb.category === "redux.action") {
if (
breadcrumb.data &&
breadcrumb.data.type === "SET_EVALUATED_TREE"
) {
breadcrumb.data = undefined;
}
}
return breadcrumb;
},
});
}
if (appsmithConfigs.smartLook.enabled) {