Skip to content

Commit 56e7648

Browse files
authored
fix: make addBreadcrumb sync (#1649)
1 parent 6c93dc1 commit 56e7648

File tree

9 files changed

+1270
-1296
lines changed

9 files changed

+1270
-1296
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## Unreleased
44

5-
- [tbd] tbd
5+
- [browser] fix: Make `addBreadcrumb` sync internally, `beforeBreadcrumb` is now only sync
6+
- [browser] fix: Remove internal `console` guard in `beforeBreadcrumb`
67

78
## 4.1.1
89

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
console.log('One');
2+
console.warn('Two', { a: 1 });
3+
console.error('Error 2');
4+
let a = () => {
5+
throw new Error('Error thrown 3');
6+
};
7+
a();

packages/browser/test/integration/init.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ Sentry.init({
4040
// return [new Sentry.Integrations.Debug({ stringify: true })].concat(old);
4141
// },
4242
beforeBreadcrumb: function(breadcrumb) {
43+
if (window.forceAllBreadcrumbs) {
44+
return breadcrumb;
45+
}
4346
// Filter console logs as we use them for debugging *a lot* and they are not *that* important
4447
if (breadcrumb.category === 'console') {
4548
return null;

0 commit comments

Comments
 (0)