-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser -
@sentry/node -
raven-js -
raven-node(raven for node) - other:
Version:
5.6.2
Description
With Sentry enabled, trigger console.assert(true, 'this never fails') and then capture exception. You'll see breadcrumb for non-failing assert added in the event. It's confusing and wrong to have breadcrumb added if assertion didn't fail. Browser doesn't print anything for non-failing assertion.
Relevant code:
sentry-javascript/packages/browser/src/integrations/breadcrumbs.ts
Lines 97 to 107 in 4cee445
| if (level === 'assert') { | |
| if (args[0] === false) { | |
| breadcrumbData.message = `Assertion failed: ${safeJoin(args.slice(1), ' ') || 'console.assert'}`; | |
| breadcrumbData.data.extra.arguments = normalize(args.slice(1), 3); | |
| } | |
| } | |
| Breadcrumbs.addBreadcrumb(breadcrumbData, { | |
| input: args, | |
| level, | |
| }); |
Metadata
Metadata
Assignees
Labels
No labels