Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update Sentry SDKs to v7.68.0 #738

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/electron-forge-webpack/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/electron-forge/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/electron-react-boilerplate/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"frames": []
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/electron-vite/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"frames": []
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/webpack-context-isolation-preload/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/webpack-context-isolation/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@
"fix:eslint": "eslint . --format stylish --fix",
"pretest": "yarn build",
"test": "cross-env TS_NODE_PROJECT=tsconfig.json xvfb-maybe electron-mocha --require ts-node/register/transpile-only --timeout 120000 ./test/unit/**/*.ts",
"pree2e": "rimraf test/e2e/dist/**/node_modules/@sentry/** test/e2e/dist/**/yarn.lock && node scripts/clean-cache.js && yarn build && npm pack",
"pree2e": "rimraf test/e2e/dist/**/node_modules/@sentry/** test/e2e/dist/**/yarn.lock test/e2e/dist/**/package-lock.json && node scripts/clean-cache.js && yarn build && npm pack",
"e2e": "cross-env TS_NODE_PROJECT=tsconfig.json xvfb-maybe mocha --require ts-node/register/transpile-only --retries 3 ./test/e2e/*.ts"
},
"dependencies": {
"@sentry/browser": "7.66.0",
"@sentry/core": "7.66.0",
"@sentry/node": "7.66.0",
"@sentry/types": "7.66.0",
"@sentry/utils": "7.66.0",
"@sentry/browser": "7.68.0",
"@sentry/core": "7.68.0",
"@sentry/node": "7.68.0",
"@sentry/types": "7.68.0",
"@sentry/utils": "7.68.0",
"deepmerge": "4.3.0",
"lru_map": "^0.3.3",
"tslib": "^2.5.0"
},
"devDependencies": {
"@sentry-internal/eslint-config-sdk": "7.66.0",
"@sentry-internal/typescript": "7.66.0",
"@sentry-internal/eslint-config-sdk": "7.68.0",
"@sentry-internal/typescript": "7.68.0",
"@types/busboy": "^0.2.3",
"@types/chai": "^4.2.10",
"@types/chai-as-promised": "^7.1.5",
Expand Down
14 changes: 13 additions & 1 deletion src/main/integrations/onuncaughtexception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,19 @@ export class OnUncaughtException implements Integration {
}));

const nodeClient = getCurrentHub().getClient() as NodeClient;
nodeClient.captureException(error, { originalException: error }, getCurrentHub().getScope());
nodeClient.captureException(
error,
{
originalException: error,
data: {
mechanism: {
handled: false,
type: 'generic',
},
},
},
getCurrentHub().getScope(),
);
await nodeClient.flush(nodeClient.getOptions().shutdownTimeout || 2000);

if (options?.onFatalError) {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const defaultIntegrations = [...defaultBrowserIntegrations, new ScopeToMa
export function init<O extends BrowserOptions>(
options: BrowserOptions & O = {} as BrowserOptions & O,
// This parameter name ensures that TypeScript error messages contain a hint for fixing SDK version mismatches
originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v7_66_0: O) => void = browserInit,
originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v7_68_0: O) => void = browserInit,
): void {
ensureProcess('renderer');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "generic"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/javascript/main-error/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "generic"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/javascript/preload-error/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/javascript/renderer-error/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/offline/renderer-error/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/browser-replay/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/child-process/event2.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/custom-renderer-name/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/error-iframe/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/main-process-module/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "generic"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/net-breadcrumbs/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "generic"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/scope-breadcrumbs/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/screenshots/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/sessions/javascript-error/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
17 changes: 0 additions & 17 deletions test/e2e/test-apps/sessions/javascript-error/session-end.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"init": false,
"started": 0,
"timestamp": 0,
"status": "ok",
"status": "crashed",
"errors": 1,
"duration": 0,
"attrs": {
Expand Down