File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -465,7 +465,7 @@ export class Scope implements ScopeInterface {
465
465
event . level = this . _level ;
466
466
}
467
467
if ( this . _transactionName ) {
468
- event . transaction = this . _transactionName ;
468
+ event . transaction = event . transaction || this . _transactionName ;
469
469
}
470
470
471
471
// We want to set the trace context for normal events only if there isn't already
Original file line number Diff line number Diff line change @@ -302,14 +302,14 @@ describe('Scope', () => {
302
302
} ) ;
303
303
} ) ;
304
304
305
- test ( ' scope transaction should have priority over event transaction' , async ( ) => {
305
+ test ( " scope transaction shouldn't overwrite existing event transaction" , async ( ) => {
306
306
expect . assertions ( 1 ) ;
307
307
const scope = new Scope ( ) ;
308
308
scope . setTransactionName ( '/abc' ) ;
309
309
const event : Event = { } ;
310
310
event . transaction = '/cdf' ;
311
311
return scope . applyToEvent ( event ) . then ( processedEvent => {
312
- expect ( processedEvent ! . transaction ) . toEqual ( '/abc ' ) ;
312
+ expect ( processedEvent ! . transaction ) . toEqual ( '/cdf ' ) ;
313
313
} ) ;
314
314
} ) ;
315
315
You can’t perform that action at this time.
0 commit comments