File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,10 @@ function sample<T extends Transaction>(
5555 // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that
5656 if ( transaction . sampled !== undefined ) {
5757 transaction . setMetadata ( {
58- transactionSampling : { method : 'explicitly_set' } ,
58+ transactionSampling : {
59+ method : 'explicitly_set' ,
60+ rate : Number ( transaction . sampled ) ,
61+ } ,
5962 } ) ;
6063 return transaction ;
6164 }
Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ describe('Hub', () => {
243243 hub . startTransaction ( { name : 'dogpark' , sampled : true } ) ;
244244
245245 expect ( Transaction . prototype . setMetadata ) . toHaveBeenCalledWith ( {
246- transactionSampling : { method : 'explicitly_set' } ,
246+ transactionSampling : { method : 'explicitly_set' , rate : 1.0 } ,
247247 } ) ;
248248 } ) ;
249249
You can’t perform that action at this time.
0 commit comments