File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,10 @@ export class Transaction extends SpanClass implements TransactionInterface {
78
78
public setName ( name : string , source : TransactionMetadata [ 'source' ] = 'custom' ) : void {
79
79
// `source` could change without the name changing if we discover that an unparameterized route is actually
80
80
// parameterized by virtue of having no parameters in its path
81
- if ( name !== this . name || source !== this . metadata . source ) {
81
+ if ( this . metadata . source && ( name !== this . name || source !== this . metadata . source ) ) {
82
82
this . metadata . changes . push ( {
83
- source,
83
+ // log previous source
84
+ source : this . metadata . source ,
84
85
timestamp : timestampInSeconds ( ) ,
85
86
propagations : this . metadata . propagations ,
86
87
} ) ;
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ export interface TransactionNameChange {
186
186
*/
187
187
timestamp : number ;
188
188
189
- /** New source applied for transaction name change */
189
+ /** Previous source before transaction name change */
190
190
source : TransactionSource ;
191
191
192
192
/** Number of propagations since start of transaction */
You can’t perform that action at this time.
0 commit comments