@@ -360,9 +360,7 @@ describe('startSpan', () => {
360360 } ,
361361 } ) ;
362362 expect ( outerTransaction ?. spans ) . toEqual ( [ { name : 'inner span' , id : expect . any ( String ) } ] ) ;
363- expect ( outerTransaction ?. tags ) . toEqual ( {
364- transaction : 'outer transaction' ,
365- } ) ;
363+ expect ( outerTransaction ?. transaction ) . toEqual ( 'outer transaction' ) ;
366364 expect ( outerTransaction ?. sdkProcessingMetadata ) . toEqual ( {
367365 dynamicSamplingContext : {
368366 environment : 'production' ,
@@ -386,9 +384,7 @@ describe('startSpan', () => {
386384 } ,
387385 } ) ;
388386 expect ( innerTransaction ?. spans ) . toEqual ( [ { name : 'inner span 2' , id : expect . any ( String ) } ] ) ;
389- expect ( innerTransaction ?. tags ) . toEqual ( {
390- transaction : 'inner transaction' ,
391- } ) ;
387+ expect ( innerTransaction ?. transaction ) . toEqual ( 'inner transaction' ) ;
392388 expect ( innerTransaction ?. sdkProcessingMetadata ) . toEqual ( {
393389 dynamicSamplingContext : {
394390 environment : 'production' ,
@@ -643,9 +639,7 @@ describe('startSpanManual', () => {
643639 } ,
644640 } ) ;
645641 expect ( outerTransaction ?. spans ) . toEqual ( [ { name : 'inner span' , id : expect . any ( String ) } ] ) ;
646- expect ( outerTransaction ?. tags ) . toEqual ( {
647- transaction : 'outer transaction' ,
648- } ) ;
642+ expect ( outerTransaction ?. transaction ) . toEqual ( 'outer transaction' ) ;
649643 expect ( outerTransaction ?. sdkProcessingMetadata ) . toEqual ( {
650644 dynamicSamplingContext : {
651645 environment : 'production' ,
@@ -669,9 +663,7 @@ describe('startSpanManual', () => {
669663 } ,
670664 } ) ;
671665 expect ( innerTransaction ?. spans ) . toEqual ( [ { name : 'inner span 2' , id : expect . any ( String ) } ] ) ;
672- expect ( innerTransaction ?. tags ) . toEqual ( {
673- transaction : 'inner transaction' ,
674- } ) ;
666+ expect ( innerTransaction ?. transaction ) . toEqual ( 'inner transaction' ) ;
675667 expect ( innerTransaction ?. sdkProcessingMetadata ) . toEqual ( {
676668 dynamicSamplingContext : {
677669 environment : 'production' ,
@@ -854,9 +846,7 @@ describe('startInactiveSpan', () => {
854846 } ,
855847 } ) ;
856848 expect ( outerTransaction ?. spans ) . toEqual ( [ { name : 'inner span' , id : expect . any ( String ) } ] ) ;
857- expect ( outerTransaction ?. tags ) . toEqual ( {
858- transaction : 'outer transaction' ,
859- } ) ;
849+ expect ( outerTransaction ?. transaction ) . toEqual ( 'outer transaction' ) ;
860850 expect ( outerTransaction ?. sdkProcessingMetadata ) . toEqual ( {
861851 dynamicSamplingContext : {
862852 environment : 'production' ,
@@ -880,9 +870,7 @@ describe('startInactiveSpan', () => {
880870 } ,
881871 } ) ;
882872 expect ( innerTransaction ?. spans ) . toEqual ( [ ] ) ;
883- expect ( innerTransaction ?. tags ) . toEqual ( {
884- transaction : 'inner transaction' ,
885- } ) ;
873+ expect ( innerTransaction ?. transaction ) . toEqual ( 'inner transaction' ) ;
886874 expect ( innerTransaction ?. sdkProcessingMetadata ) . toEqual ( {
887875 dynamicSamplingContext : {
888876 environment : 'production' ,
@@ -948,9 +936,13 @@ describe('startInactiveSpan', () => {
948936
949937 let span : Span | undefined ;
950938
939+ const scope = getCurrentScope ( ) ;
940+ scope . setTag ( 'outer' , 'foo' ) ;
941+
951942 withScope ( scope => {
952943 scope . setTag ( 'scope' , 1 ) ;
953944 span = startInactiveSpan ( { name : 'my-span' } ) ;
945+ scope . setTag ( 'scope_after_span' , 2 ) ;
954946 } ) ;
955947
956948 withScope ( scope => {
@@ -964,7 +956,9 @@ describe('startInactiveSpan', () => {
964956 expect ( beforeSendTransaction ) . toHaveBeenCalledWith (
965957 expect . objectContaining ( {
966958 tags : expect . objectContaining ( {
959+ outer : 'foo' ,
967960 scope : 1 ,
961+ scope_after_span : 2 ,
968962 } ) ,
969963 } ) ,
970964 expect . anything ( ) ,
0 commit comments