File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -325,6 +325,13 @@ export class Scope implements ScopeInterface {
325325 return this . _session ;
326326 }
327327
328+ /**
329+ * @inheritDoc
330+ */
331+ public getBreadcrumbs ( ) : Breadcrumb [ ] {
332+ return this . _breadcrumbs ;
333+ }
334+
328335 /**
329336 * @inheritDoc
330337 */
@@ -515,8 +522,9 @@ export class Scope implements ScopeInterface {
515522
516523 this . _applyFingerprint ( event ) ;
517524
518- event . breadcrumbs = [ ...( event . breadcrumbs || [ ] ) , ...this . _breadcrumbs ] ;
519- event . breadcrumbs = event . breadcrumbs . length > 0 ? event . breadcrumbs : undefined ;
525+ const scopeBreadcrumbs = this . getBreadcrumbs ( ) ;
526+ const breadcrumbs = [ ...( event . breadcrumbs || [ ] ) , ...scopeBreadcrumbs ] ;
527+ event . breadcrumbs = breadcrumbs . length > 0 ? breadcrumbs : undefined ;
520528
521529 event . sdkProcessingMetadata = {
522530 ...event . sdkProcessingMetadata ,
Original file line number Diff line number Diff line change @@ -128,6 +128,11 @@ export interface Scope {
128128 */
129129 setSession ( session ?: Session ) : this;
130130
131+ /**
132+ * Get all breadcrumbs for this scope.
133+ */
134+ getBreadcrumbs ( ) : Breadcrumb [ ] ;
135+
131136 /**
132137 * Returns the `RequestSession` if there is one
133138 */
You can’t perform that action at this time.
0 commit comments