@@ -21,14 +21,14 @@ test.describe('tracing in static/pre-rendered routes', () => {
2121 const clientPageloadTraceId = clientPageloadTxn . contexts ?. trace ?. trace_id ;
2222 const clientPageloadParentSpanId = clientPageloadTxn . contexts ?. trace ?. parent_span_id ;
2323
24- const sentryTraceMetaTagContent = await page . locator ( 'meta[name="sentry-trace"]' ) . getAttribute ( 'content' ) ;
25- const baggageMetaTagContent = await page . locator ( 'meta[name="baggage"]' ) . getAttribute ( 'content' ) ;
24+ const sentryTraceMetaTags = await page . locator ( 'meta[name="sentry-trace"]' ) . count ( ) ;
25+ expect ( sentryTraceMetaTags ) . toBe ( 0 ) ;
2626
27- const [ metaTraceId , metaParentSpanId , metaSampled ] = sentryTraceMetaTagContent ?. split ( '-' ) || [ ] ;
27+ const baggageMetaTags = await page . locator ( 'meta[name="baggage"]' ) . count ( ) ;
28+ expect ( baggageMetaTags ) . toBe ( 0 ) ;
2829
2930 expect ( clientPageloadTraceId ) . toMatch ( / [ a - f 0 - 9 ] { 32 } / ) ;
30- expect ( clientPageloadParentSpanId ) . toMatch ( / [ a - f 0 - 9 ] { 16 } / ) ;
31- expect ( metaSampled ) . toBe ( '1' ) ;
31+ expect ( clientPageloadParentSpanId ) . toBeUndefined ( ) ;
3232
3333 expect ( clientPageloadTxn ) . toMatchObject ( {
3434 contexts : {
@@ -40,9 +40,8 @@ test.describe('tracing in static/pre-rendered routes', () => {
4040 } ) ,
4141 op : 'pageload' ,
4242 origin : 'auto.pageload.astro' ,
43- parent_span_id : metaParentSpanId ,
4443 span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
45- trace_id : metaTraceId ,
44+ trace_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 32 } / ) ,
4645 } ,
4746 } ,
4847 platform : 'javascript' ,
@@ -53,9 +52,6 @@ test.describe('tracing in static/pre-rendered routes', () => {
5352 type : 'transaction' ,
5453 } ) ;
5554
56- expect ( baggageMetaTagContent ) . toContain ( 'sentry-transaction=GET%20%2Ftest-static' ) ; // URL-encoded for 'GET /test-static'
57- expect ( baggageMetaTagContent ) . toContain ( 'sentry-sampled=true' ) ;
58-
5955 await page . waitForTimeout ( 1000 ) ; // wait another sec to ensure no server transaction is sent
6056 } ) ;
6157} ) ;
0 commit comments