@@ -326,6 +326,8 @@ describe('wrapServerLoadWithSentry calls trace', () => {
326
326
expect ( transactions ) . toHaveLength ( 1 ) ;
327
327
const transaction = transactions [ 0 ] ;
328
328
329
+ console . log ( JSON . stringify ( transaction . contexts ?. trace , null , 2 ) ) ;
330
+
329
331
expect ( transaction . contexts ?. trace ) . toEqual ( {
330
332
data : {
331
333
[ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'auto.function.sveltekit' ,
@@ -338,7 +340,6 @@ describe('wrapServerLoadWithSentry calls trace', () => {
338
340
op : 'function.sveltekit.server.load' ,
339
341
span_id : expect . any ( String ) ,
340
342
trace_id : expect . not . stringContaining ( '1234567890abcdef1234567890abcdef' ) ,
341
- parent_span_id : expect . not . stringContaining ( '1234567890abcdef' ) ,
342
343
origin : 'auto.function.sveltekit' ,
343
344
status : 'ok' ,
344
345
} ) ;
@@ -354,7 +355,7 @@ describe('wrapServerLoadWithSentry calls trace', () => {
354
355
} ) ;
355
356
} ) ;
356
357
357
- it ( "doesn't attach the DSC data if the baggage header not available" , async ( ) => {
358
+ it ( "doesn't attach the DSC data if the baggage header is not available" , async ( ) => {
358
359
const transactions : Event [ ] = [ ] ;
359
360
360
361
init ( {
@@ -381,12 +382,15 @@ describe('wrapServerLoadWithSentry calls trace', () => {
381
382
[ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'route' ,
382
383
[ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : 'function.sveltekit.server.load' ,
383
384
'http.method' : 'GET' ,
385
+ 'otel.kind' : 'INTERNAL' ,
386
+ 'sentry.sample_rate' : 1 ,
384
387
} ,
385
388
op : 'function.sveltekit.server.load' ,
386
389
parent_span_id : '1234567890abcdef' ,
387
390
span_id : expect . any ( String ) ,
388
391
trace_id : '1234567890abcdef1234567890abcdef' ,
389
392
origin : 'auto.function.sveltekit' ,
393
+ status : 'ok' ,
390
394
} ) ;
391
395
expect ( transaction . transaction ) . toEqual ( '/users/[id]' ) ;
392
396
expect ( transaction . sdkProcessingMetadata ?. dynamicSamplingContext ) . toEqual ( { } ) ;
@@ -422,12 +426,15 @@ describe('wrapServerLoadWithSentry calls trace', () => {
422
426
[ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'url' ,
423
427
[ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : 'function.sveltekit.server.load' ,
424
428
'http.method' : 'GET' ,
429
+ 'otel.kind' : 'INTERNAL' ,
430
+ 'sentry.sample_rate' : 1 ,
425
431
} ,
426
432
op : 'function.sveltekit.server.load' ,
427
433
parent_span_id : '1234567890abcdef' ,
428
434
span_id : expect . any ( String ) ,
429
435
trace_id : '1234567890abcdef1234567890abcdef' ,
430
436
origin : 'auto.function.sveltekit' ,
437
+ status : 'ok' ,
431
438
} ) ;
432
439
expect ( transaction . transaction ) . toEqual ( '/users/123' ) ;
433
440
} ) ;
0 commit comments