@@ -15,7 +15,6 @@ import {
1515import { getAsyncContextStrategy } from '../../../src/asyncContext' ;
1616import { freezeDscOnSpan } from '../../../src/tracing/dynamicSamplingContext' ;
1717import type { Span } from '../../../src/types-hoist/span' ;
18- import { _sentryTraceToTraceParentHeader } from '../../../src/utils/traceData' ;
1918import type { TestClientOptions } from '../../mocks/client' ;
2019import { getDefaultTestClientOptions , TestClient } from '../../mocks/client' ;
2120
@@ -349,34 +348,3 @@ describe('getTraceData', () => {
349348 expect ( traceData . traceparent ) . toMatch ( / 0 0 - 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 9 9 - [ 0 - 9 a - f ] { 16 } - 0 0 / ) ;
350349 } ) ;
351350} ) ;
352-
353- describe ( '_sentryTraceToTraceParentHeader' , ( ) => {
354- it ( 'returns positively sampled traceparent header for sentry-trace with positive sampling decision' , ( ) => {
355- const traceparent = _sentryTraceToTraceParentHeader ( '12345678901234567890123456789012-1234567890123456-1' ) ;
356- expect ( traceparent ) . toBe ( '00-12345678901234567890123456789012-1234567890123456-01' ) ;
357- } ) ;
358-
359- it ( 'returns negatively sampled traceparent header for sentry-trace with negative sampling decision' , ( ) => {
360- const traceparent = _sentryTraceToTraceParentHeader ( '12345678901234567890123456789012-1234567890123456-0' ) ;
361- expect ( traceparent ) . toBe ( '00-12345678901234567890123456789012-1234567890123456-00' ) ;
362- } ) ;
363-
364- it ( 'returns negatively sampled traceparent header for sentry-trace with no/deferred sampling decision' , ( ) => {
365- const traceparent = _sentryTraceToTraceParentHeader ( '12345678901234567890123456789012-1234567890123456' ) ;
366- expect ( traceparent ) . toBe ( '00-12345678901234567890123456789012-1234567890123456-00' ) ;
367- } ) ;
368-
369- it . each ( [
370- '12345678901234567890123456789012--0' ,
371- '-12345678901234567890123456789012-0' ,
372- '--1' ,
373- '0' ,
374- '1' ,
375- '' ,
376- '00-12345678901234567890123456789012-1234567890123456-01' ,
377- '00-12345678901234567890123456789012-1234567890123456-00' ,
378- ] ) ( 'returns undefined if the sentry-trace header is invalid (%s)' , sentryTrace => {
379- const traceparent = _sentryTraceToTraceParentHeader ( sentryTrace ) ;
380- expect ( traceparent ) . toBeUndefined ( ) ;
381- } ) ;
382- } ) ;
0 commit comments