File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import {
3535 SyncPromise ,
3636 truncate ,
3737 uuid4 ,
38+ timestampInSeconds ,
3839} from '@sentry/utils' ;
3940
4041import { getEnvelopeEndpointWithUrlEncodedAuth } from './api' ;
@@ -653,6 +654,29 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
653654 throw new SentryError ( '`beforeSend` returned `null`, will not send event.' , 'log' ) ;
654655 }
655656
657+ const transactionInfo = processedEvent . transaction_info ;
658+ if (
659+ processedEvent . type === 'transaction' &&
660+ transactionInfo &&
661+ processedEvent . transaction &&
662+ processedEvent . transaction !== event . transaction
663+ ) {
664+ const source = 'custom' ;
665+ event . transaction_info = {
666+ ...transactionInfo ,
667+ source,
668+ name_changes : [
669+ ...transactionInfo . name_changes ,
670+ {
671+ name : processedEvent . transaction ,
672+ source,
673+ timestamp : timestampInSeconds ( ) ,
674+ propagations : transactionInfo . num_propagations ,
675+ } ,
676+ ] ,
677+ } ;
678+ }
679+
656680 const session = scope && scope . getSession ( ) ;
657681 if ( ! isTransaction && session ) {
658682 this . _updateSessionFromEvent ( session , processedEvent ) ;
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' ;
You can’t perform that action at this time.
0 commit comments