@@ -40,6 +40,7 @@ import {
40
40
startBrowserTracingPageLoadSpan ,
41
41
} from '../../src/tracing/browserTracingIntegration' ;
42
42
import { getDefaultBrowserClientOptions } from '../helper/browser-client-options' ;
43
+ import { PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE } from '../../src/tracing/previousTrace' ;
43
44
44
45
// We're setting up JSDom here because the Next.js routing instrumentations requires a few things to be present on pageload:
45
46
// 1. Access to window.document API for `window.document.getElementById`
@@ -202,6 +203,7 @@ describe('browserTracingIntegration', () => {
202
203
[ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'auto.navigation.browser' ,
203
204
[ SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE ] : 1 ,
204
205
[ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'url' ,
206
+ [ PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE ] : `${ span ?. spanContext ( ) . traceId } -${ span ?. spanContext ( ) . spanId } -1` ,
205
207
} ,
206
208
links : [
207
209
{
@@ -239,6 +241,7 @@ describe('browserTracingIntegration', () => {
239
241
[ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'auto.navigation.browser' ,
240
242
[ SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE ] : 1 ,
241
243
[ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'url' ,
244
+ [ PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE ] : `${ span2 ?. spanContext ( ) . traceId } -${ span2 ?. spanContext ( ) . spanId } -1` ,
242
245
} ,
243
246
links : [
244
247
{
@@ -502,6 +505,7 @@ describe('browserTracingIntegration', () => {
502
505
[ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'manual' ,
503
506
[ SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE ] : 1 ,
504
507
[ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'custom' ,
508
+ [ PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE ] : expect . stringMatching ( / [ a - f 0 - 9 ] { 32 } - [ a - f 0 - 9 ] { 16 } - 1 / ) ,
505
509
} ,
506
510
links : [
507
511
{
0 commit comments