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 {
325
325
return this . _session ;
326
326
}
327
327
328
+ /**
329
+ * @inheritDoc
330
+ */
331
+ public getBreadcrumbs ( ) : Breadcrumb [ ] {
332
+ return this . _breadcrumbs ;
333
+ }
334
+
328
335
/**
329
336
* @inheritDoc
330
337
*/
@@ -515,8 +522,9 @@ export class Scope implements ScopeInterface {
515
522
516
523
this . _applyFingerprint ( event ) ;
517
524
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 ;
520
528
521
529
event . sdkProcessingMetadata = {
522
530
...event . sdkProcessingMetadata ,
Original file line number Diff line number Diff line change @@ -128,6 +128,11 @@ export interface Scope {
128
128
*/
129
129
setSession ( session ?: Session ) : this;
130
130
131
+ /**
132
+ * Get all breadcrumbs for this scope.
133
+ */
134
+ getBreadcrumbs ( ) : Breadcrumb [ ] ;
135
+
131
136
/**
132
137
* Returns the `RequestSession` if there is one
133
138
*/
You can’t perform that action at this time.
0 commit comments