File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import {
2929 isThenable ,
3030 logger ,
3131 SyncPromise ,
32+ timestampWithMs ,
3233} from '@sentry/utils' ;
3334
3435import { updateSession } from './session' ;
@@ -466,6 +467,23 @@ export class Scope implements ScopeInterface {
466467 }
467468 if ( this . _transactionName ) {
468469 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+ }
469487 }
470488
471489 // 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