@@ -402,7 +402,7 @@ export class Hub implements HubInterface {
402402 */
403403 public addBreadcrumb ( breadcrumb : Breadcrumb , hint ?: BreadcrumbHint ) : void {
404404 // eslint-disable-next-line deprecation/deprecation
405- const { scope , client } = this . getStackTop ( ) ;
405+ const { client } = this . getStackTop ( ) ;
406406
407407 if ( ! client ) return ;
408408
@@ -421,15 +421,8 @@ export class Hub implements HubInterface {
421421
422422 client . emit ( 'beforeAddBreadcrumb' , finalBreadcrumb , hint ) ;
423423
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 ) ;
433426 }
434427
435428 /**
0 commit comments