@@ -24,7 +24,8 @@ test('basic', function (t) {
2424 t . equal ( data . spans . length , 4 )
2525
2626 data . transactions . forEach ( function ( trans , index ) {
27- t . ok ( / [ \d a - f ] { 8 } - ( [ \d a - f ] { 4 } - ) { 3 } [ \d a - f ] { 12 } / . test ( trans . id ) )
27+ t . ok ( / ^ [ \d a - f ] { 16 } $ / . test ( trans . id ) )
28+ t . ok ( / ^ [ \d a - f ] { 32 } $ / . test ( trans . trace_id ) )
2829 t . equal ( trans . name , 'foo' + index )
2930 t . equal ( trans . type , 'bar' + index )
3031 t . ok ( trans . duration > 0 , 'duration should be >0ms' )
@@ -36,7 +37,7 @@ test('basic', function (t) {
3637 const name = 't' + index + i
3738 const span = findObjInArray ( data . spans , 'name' , name )
3839 t . ok ( span , 'should have span named ' + name )
39- t . equal ( span . transactionId , trans . id , 'should belong to correct transaction' )
40+ t . equal ( span . transaction_id , trans . id , 'should belong to correct transaction' )
4041 t . equal ( span . type , 'type' )
4142 t . ok ( span . start > 0 , 'span start should be >0ms' )
4243 t . ok ( span . start < 100 , 'span start should be <100ms' )
@@ -88,7 +89,7 @@ test('same tick', function (t) {
8889 const name = 't' + i
8990 const span = findObjInArray ( data . spans , 'name' , name )
9091 t . ok ( span , 'should have span named ' + name )
91- t . equal ( span . transactionId , trans . id , 'should belong to correct transaction' )
92+ t . equal ( span . transaction_id , trans . id , 'should belong to correct transaction' )
9293 }
9394 t . end ( )
9495 } )
@@ -111,7 +112,7 @@ test('serial - no parents', function (t) {
111112 const name = 't' + i
112113 const span = findObjInArray ( data . spans , 'name' , name )
113114 t . ok ( span , 'should have span named ' + name )
114- t . equal ( span . transactionId , trans . id , 'should belong to correct transaction' )
115+ t . equal ( span . transaction_id , trans . id , 'should belong to correct transaction' )
115116 }
116117 t . end ( )
117118 } )
@@ -138,7 +139,7 @@ test('serial - with parents', function (t) {
138139 const name = 't' + i
139140 const span = findObjInArray ( data . spans , 'name' , name )
140141 t . ok ( span , 'should have span named ' + name )
141- t . equal ( span . transactionId , trans . id , 'should belong to correct transaction' )
142+ t . equal ( span . transaction_id , trans . id , 'should belong to correct transaction' )
142143 }
143144 t . end ( )
144145 } )
@@ -165,7 +166,7 @@ test('stack branching - no parents', function (t) {
165166 const name = 't' + i
166167 const span = findObjInArray ( data . spans , 'name' , name )
167168 t . ok ( span , 'should have span named ' + name )
168- t . equal ( span . transactionId , trans . id , 'should belong to correct transaction' )
169+ t . equal ( span . transaction_id , trans . id , 'should belong to correct transaction' )
169170 }
170171 t . end ( )
171172 } )
@@ -191,7 +192,7 @@ test('currentTransaction missing - recoverable', function (t) {
191192 const name = 't0'
192193 const span = findObjInArray ( data . spans , 'name' , name )
193194 t . ok ( span , 'should have span named ' + name )
194- t . equal ( span . transactionId , trans . id , 'should belong to correct transaction' )
195+ t . equal ( span . transaction_id , trans . id , 'should belong to correct transaction' )
195196 t . end ( )
196197 } )
197198 var ins = agent . _instrumentation
@@ -219,7 +220,7 @@ test('currentTransaction missing - not recoverable - last span failed', function
219220 const name = 't0'
220221 const span = findObjInArray ( data . spans , 'name' , name )
221222 t . ok ( span , 'should have span named ' + name )
222- t . equal ( span . transactionId , trans . id , 'should belong to correct transaction' )
223+ t . equal ( span . transaction_id , trans . id , 'should belong to correct transaction' )
223224 t . end ( )
224225 } )
225226 var ins = agent . _instrumentation
@@ -250,7 +251,7 @@ test('currentTransaction missing - not recoverable - middle span failed', functi
250251 for ( const name of names ) {
251252 const span = findObjInArray ( data . spans , 'name' , name )
252253 t . ok ( span , 'should have span named ' + name )
253- t . equal ( span . transactionId , trans . id , 'should belong to correct transaction' )
254+ t . equal ( span . transaction_id , trans . id , 'should belong to correct transaction' )
254255 }
255256 t . end ( )
256257 } )
@@ -374,7 +375,8 @@ test('unsampled transactions do not include spans', function (t) {
374375 t . equal ( data . transactions . length , 1 )
375376
376377 data . transactions . forEach ( function ( trans ) {
377- t . ok ( / [ \d a - f ] { 8 } - ( [ \d a - f ] { 4 } - ) { 3 } [ \d a - f ] { 12 } / . test ( trans . id ) )
378+ t . ok ( / ^ [ \d a - f ] { 16 } $ / . test ( trans . id ) )
379+ t . ok ( / ^ [ \d a - f ] { 32 } $ / . test ( trans . trace_id ) )
378380 t . ok ( trans . duration > 0 , 'duration should be >0ms' )
379381 t . ok ( trans . duration < 100 , 'duration should be <100ms' )
380382 t . notOk ( Number . isNaN ( ( new Date ( trans . timestamp ) ) . getTime ( ) ) )
0 commit comments