@@ -402,7 +402,7 @@ export class Hub implements HubInterface {
402
402
*/
403
403
public addBreadcrumb ( breadcrumb : Breadcrumb , hint ?: BreadcrumbHint ) : void {
404
404
// eslint-disable-next-line deprecation/deprecation
405
- const { scope , client } = this . getStackTop ( ) ;
405
+ const { client } = this . getStackTop ( ) ;
406
406
407
407
if ( ! client ) return ;
408
408
@@ -421,15 +421,8 @@ export class Hub implements HubInterface {
421
421
422
422
client . emit ( 'beforeAddBreadcrumb' , finalBreadcrumb , hint ) ;
423
423
424
- // TODO(v8): I know this comment doesn't make much sense because the hub will be deprecated but I still wanted to
425
- // write it down. In theory, we would have to add the breadcrumbs to the isolation scope here, however, that would
426
- // duplicate all of the breadcrumbs. There was the possibility of adding breadcrumbs to both, the isolation scope
427
- // and the normal scope, and deduplicating it down the line in the event processing pipeline. However, that would
428
- // have been very fragile, because the breadcrumb objects would have needed to keep their identity all throughout
429
- // the event processing pipeline.
430
- // In the new implementation, the top level `Sentry.addBreadcrumb()` should ONLY write to the isolation scope.
431
-
432
- scope . addBreadcrumb ( finalBreadcrumb , maxBreadcrumbs ) ;
424
+ // eslint-disable-next-line deprecation/deprecation
425
+ this . getIsolationScope ( ) . addBreadcrumb ( finalBreadcrumb , maxBreadcrumbs ) ;
433
426
}
434
427
435
428
/**
0 commit comments