@@ -18,7 +18,6 @@ describe('eventToSentryRequest', () => {
18
18
environment,
19
19
release,
20
20
contexts : { trace : { trace_id : trace_id , span_id : '12261980' , op : 'ball.fetch' } } ,
21
- // TODO
22
21
user : { id : '1121' , username : 'CharlieDog' , ip_address : '11.21.20.12' } ,
23
22
} ;
24
23
@@ -40,7 +39,7 @@ describe('eventToSentryRequest', () => {
40
39
tags : {
41
40
dog : 'Charlie' ,
42
41
__sentry_samplingMethod : TransactionSamplingMethod . Rate ,
43
- __sentry_sampleRate : ' .1121' ,
42
+ __sentry_sampleRate : 0 .1121,
44
43
__sentry_tracestate : computeTracestate ( tracestateObject ) ,
45
44
} ,
46
45
transaction : '/dogs/are/great/' ,
@@ -90,15 +89,14 @@ describe('eventToSentryRequest', () => {
90
89
} ) ;
91
90
92
91
[
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' } ,
98
96
99
97
// this shouldn't ever happen (tags should always include at least the sampling method), but good to know that
100
98
// things won't blow up if it does happen
101
- { __sentry_samplingMethod : '' , __sentry_sampleRate : '' , dog : 'Lucy' } ,
99
+ { dog : 'Lucy' } ,
102
100
] . forEach ( tags => {
103
101
const { __sentry_samplingMethod : method , __sentry_sampleRate : rate , dog } = tags ;
104
102
@@ -115,8 +113,7 @@ describe('eventToSentryRequest', () => {
115
113
116
114
expect ( itemHeader ) . toEqual ( {
117
115
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 } ] ,
120
117
} ) ;
121
118
} ) ;
122
119
} ) ;
0 commit comments