@@ -45,18 +45,18 @@ export class IdleTransactionSpanRecorder extends SpanRecorder {
4545 public add ( span : Span ) : void {
4646 // We should make sure we do not push and pop activities for
4747 // the transaction that this span recorder belongs to.
48- if ( span . spanId !== this . transactionSpanId ) {
48+ if ( span . spanContext ( ) . spanId !== this . transactionSpanId ) {
4949 // We patch span.end() to pop an activity after setting an endTimestamp.
5050 // eslint-disable-next-line @typescript-eslint/unbound-method
5151 const originalEnd = span . end ;
5252 span . end = ( ...rest : unknown [ ] ) => {
53- this . _popActivity ( span . spanId ) ;
53+ this . _popActivity ( span . spanContext ( ) . spanId ) ;
5454 return originalEnd . apply ( span , rest ) ;
5555 } ;
5656
5757 // We should only push new activities if the span does not have an end timestamp.
5858 if ( span . endTimestamp === undefined ) {
59- this . _pushActivity ( span . spanId ) ;
59+ this . _pushActivity ( span . spanContext ( ) . spanId ) ;
6060 }
6161 }
6262
@@ -123,7 +123,7 @@ export class IdleTransaction extends Transaction {
123123 if ( _onScope ) {
124124 // We set the transaction here on the scope so error events pick up the trace
125125 // context and attach it to the error.
126- DEBUG_BUILD && logger . log ( `Setting idle transaction on scope. Span ID: ${ this . spanId } ` ) ;
126+ DEBUG_BUILD && logger . log ( `Setting idle transaction on scope. Span ID: ${ this . spanContext ( ) . spanId } ` ) ;
127127 _idleHub . getScope ( ) . setSpan ( this ) ;
128128 }
129129
@@ -158,7 +158,7 @@ export class IdleTransaction extends Transaction {
158158
159159 this . spanRecorder . spans = this . spanRecorder . spans . filter ( ( span : Span ) => {
160160 // If we are dealing with the transaction itself, we just return it
161- if ( span . spanId === this . spanId ) {
161+ if ( span . spanContext ( ) . spanId === this . spanContext ( ) . spanId ) {
162162 return true ;
163163 }
164164
@@ -233,7 +233,7 @@ export class IdleTransaction extends Transaction {
233233 this . _popActivity ( id ) ;
234234 } ;
235235
236- this . spanRecorder = new IdleTransactionSpanRecorder ( pushActivity , popActivity , this . spanId , maxlen ) ;
236+ this . spanRecorder = new IdleTransactionSpanRecorder ( pushActivity , popActivity , this . spanContext ( ) . spanId , maxlen ) ;
237237
238238 // Start heartbeat so that transactions do not run forever.
239239 DEBUG_BUILD && logger . log ( 'Starting heartbeat' ) ;
0 commit comments