@@ -326,6 +326,8 @@ describe('wrapServerLoadWithSentry calls trace', () => {
326326    expect ( transactions ) . toHaveLength ( 1 ) ; 
327327    const  transaction  =  transactions [ 0 ] ; 
328328
329+     console . log ( JSON . stringify ( transaction . contexts ?. trace ,  null ,  2 ) ) ; 
330+ 
329331    expect ( transaction . contexts ?. trace ) . toEqual ( { 
330332      data : { 
331333        [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'auto.function.sveltekit' , 
@@ -338,7 +340,6 @@ describe('wrapServerLoadWithSentry calls trace', () => {
338340      op : 'function.sveltekit.server.load' , 
339341      span_id : expect . any ( String ) , 
340342      trace_id : expect . not . stringContaining ( '1234567890abcdef1234567890abcdef' ) , 
341-       parent_span_id : expect . not . stringContaining ( '1234567890abcdef' ) , 
342343      origin : 'auto.function.sveltekit' , 
343344      status : 'ok' , 
344345    } ) ; 
@@ -354,7 +355,7 @@ describe('wrapServerLoadWithSentry calls trace', () => {
354355    } ) ; 
355356  } ) ; 
356357
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  ( )  =>  { 
358359    const  transactions : Event [ ]  =  [ ] ; 
359360
360361    init ( { 
@@ -381,12 +382,15 @@ describe('wrapServerLoadWithSentry calls trace', () => {
381382        [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'route' , 
382383        [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : 'function.sveltekit.server.load' , 
383384        'http.method' : 'GET' , 
385+         'otel.kind' : 'INTERNAL' , 
386+         'sentry.sample_rate' : 1 , 
384387      } , 
385388      op : 'function.sveltekit.server.load' , 
386389      parent_span_id : '1234567890abcdef' , 
387390      span_id : expect . any ( String ) , 
388391      trace_id : '1234567890abcdef1234567890abcdef' , 
389392      origin : 'auto.function.sveltekit' , 
393+       status : 'ok' , 
390394    } ) ; 
391395    expect ( transaction . transaction ) . toEqual ( '/users/[id]' ) ; 
392396    expect ( transaction . sdkProcessingMetadata ?. dynamicSamplingContext ) . toEqual ( { } ) ; 
@@ -422,12 +426,15 @@ describe('wrapServerLoadWithSentry calls trace', () => {
422426        [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'url' , 
423427        [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : 'function.sveltekit.server.load' , 
424428        'http.method' : 'GET' , 
429+         'otel.kind' : 'INTERNAL' , 
430+         'sentry.sample_rate' : 1 , 
425431      } , 
426432      op : 'function.sveltekit.server.load' , 
427433      parent_span_id : '1234567890abcdef' , 
428434      span_id : expect . any ( String ) , 
429435      trace_id : '1234567890abcdef1234567890abcdef' , 
430436      origin : 'auto.function.sveltekit' , 
437+       status : 'ok' , 
431438    } ) ; 
432439    expect ( transaction . transaction ) . toEqual ( '/users/123' ) ; 
433440  } ) ; 
0 commit comments