@@ -18,7 +18,6 @@ describe('eventToSentryRequest', () => {
1818 environment,
1919 release,
2020 contexts : { trace : { trace_id : trace_id , span_id : '12261980' , op : 'ball.fetch' } } ,
21- // TODO
2221 user : { id : '1121' , username : 'CharlieDog' , ip_address : '11.21.20.12' } ,
2322 } ;
2423
@@ -40,7 +39,7 @@ describe('eventToSentryRequest', () => {
4039 tags : {
4140 dog : 'Charlie' ,
4241 __sentry_samplingMethod : TransactionSamplingMethod . Rate ,
43- __sentry_sampleRate : ' .1121' ,
42+ __sentry_sampleRate : 0 .1121,
4443 __sentry_tracestate : computeTracestate ( tracestateObject ) ,
4544 } ,
4645 transaction : '/dogs/are/great/' ,
@@ -90,15 +89,14 @@ describe('eventToSentryRequest', () => {
9089 } ) ;
9190
9291 [
93- // TODO kmclb - once tag types are loosened, don't need to cast rate and undefined to strings here
94- { __sentry_samplingMethod : TransactionSamplingMethod . Rate , __sentry_sampleRate : '0.1121' , dog : 'Charlie' } ,
95- { __sentry_samplingMethod : TransactionSamplingMethod . Sampler , __sentry_sampleRate : '0.1231' , dog : 'Maisey' } ,
96- { __sentry_samplingMethod : TransactionSamplingMethod . Inheritance , __sentry_sampleRate : '' , dog : 'Cory' } ,
97- { __sentry_samplingMethod : TransactionSamplingMethod . Explicit , __sentry_sampleRate : '' , dog : 'Bodhi' } ,
92+ { __sentry_samplingMethod : TransactionSamplingMethod . Rate , __sentry_sampleRate : 0.1121 , dog : 'Charlie' } ,
93+ { __sentry_samplingMethod : TransactionSamplingMethod . Sampler , __sentry_sampleRate : 0.1231 , dog : 'Maisey' } ,
94+ { __sentry_samplingMethod : TransactionSamplingMethod . Inheritance , dog : 'Cory' } ,
95+ { __sentry_samplingMethod : TransactionSamplingMethod . Explicit , dog : 'Bodhi' } ,
9896
9997 // this shouldn't ever happen (tags should always include at least the sampling method), but good to know that
10098 // things won't blow up if it does happen
101- { __sentry_samplingMethod : '' , __sentry_sampleRate : '' , dog : 'Lucy' } ,
99+ { dog : 'Lucy' } ,
102100 ] . forEach ( tags => {
103101 const { __sentry_samplingMethod : method , __sentry_sampleRate : rate , dog } = tags ;
104102
@@ -115,8 +113,7 @@ describe('eventToSentryRequest', () => {
115113
116114 expect ( itemHeader ) . toEqual ( {
117115 type : 'transaction' ,
118- // TODO kmclb - once tag types are loosened, don't need to cast to string here
119- sample_rates : [ { id : String ( method ) , rate : String ( rate ) } ] ,
116+ sample_rates : [ { id : method , rate } ] ,
120117 } ) ;
121118 } ) ;
122119 } ) ;
0 commit comments