File tree Expand file tree Collapse file tree 2 files changed +1
-28
lines changed Expand file tree Collapse file tree 2 files changed +1
-28
lines changed Original file line number Diff line number Diff line change @@ -246,10 +246,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
246
246
const { publicKey : public_key } = client . getDsn ( ) || { } ;
247
247
248
248
const rate = this . metadata && this . metadata . transactionSampling && this . metadata . transactionSampling . rate ;
249
- const sample_rate =
250
- rate !== undefined
251
- ? rate . toLocaleString ( 'fullwide' , { useGrouping : false , maximumFractionDigits : 16 } )
252
- : undefined ;
249
+ const sample_rate = rate !== undefined ? JSON . stringify ( rate ) : undefined ;
253
250
254
251
const scope = hub . getScope ( ) ;
255
252
const { segment : user_segment } = ( scope && scope . getUser ( ) ) || { } ;
Original file line number Diff line number Diff line change @@ -449,30 +449,6 @@ describe('Span', () => {
449
449
expect ( baggage && getThirdPartyBaggage ( baggage ) ) . toStrictEqual ( '' ) ;
450
450
} ) ;
451
451
452
- test ( 'exponential sample rate notation is converted to decimal notation' , ( ) => {
453
- const transaction = new Transaction (
454
- {
455
- name : 'tx' ,
456
- metadata : {
457
- transactionSampling : { rate : 1.45e-14 , method : 'client_rate' } ,
458
- } ,
459
- } ,
460
- hub ,
461
- ) ;
462
-
463
- const baggage = transaction . getBaggage ( ) ;
464
-
465
- expect ( baggage && isSentryBaggageEmpty ( baggage ) ) . toBe ( false ) ;
466
- expect ( baggage && getSentryBaggageItems ( baggage ) ) . toStrictEqual ( {
467
- release : '1.0.1' ,
468
- environment : 'production' ,
469
- // transaction: 'tx',
470
- sample_rate : '0.0000000000000145' ,
471
- trace_id : expect . any ( String ) ,
472
- } ) ;
473
- expect ( baggage && getThirdPartyBaggage ( baggage ) ) . toStrictEqual ( '' ) ;
474
- } ) ;
475
-
476
452
describe ( 'Including transaction name in DSC' , ( ) => {
477
453
test . each ( [
478
454
[ 'is not included if transaction source is not set' , undefined ] ,
You can’t perform that action at this time.
0 commit comments