File tree 1 file changed +18
-0
lines changed 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import {
29
29
isThenable ,
30
30
logger ,
31
31
SyncPromise ,
32
+ timestampWithMs ,
32
33
} from '@sentry/utils' ;
33
34
34
35
import { updateSession } from './session' ;
@@ -466,6 +467,23 @@ export class Scope implements ScopeInterface {
466
467
}
467
468
if ( this . _transactionName ) {
468
469
event . transaction = this . _transactionName ;
470
+ const transactionInfo = event . transaction_info ;
471
+ if ( transactionInfo ) {
472
+ const source = 'custom' ;
473
+ event . transaction_info = {
474
+ ...transactionInfo ,
475
+ source,
476
+ name_changes : [
477
+ ...transactionInfo . name_changes ,
478
+ {
479
+ name : this . _transactionName ,
480
+ source,
481
+ timestamp : timestampWithMs ( ) ,
482
+ propagations : transactionInfo . num_propagations ,
483
+ } ,
484
+ ] ,
485
+ } ;
486
+ }
469
487
}
470
488
471
489
// We want to set the trace context for normal events only if there isn't already
You can’t perform that action at this time.
0 commit comments