@@ -92,7 +92,7 @@ export interface BrowserTracingOptions extends RequestInstrumentationOptions {
92
92
*
93
93
* Default: undefined
94
94
*/
95
- _experiments ?: Partial < { enableLongTask : boolean ; interactionSampleRate : number } > ;
95
+ _experiments ?: Partial < { enableLongTask : boolean ; enableInteractions : boolean } > ;
96
96
97
97
/**
98
98
* beforeNavigate is called before a pageload/navigation transaction is created and allows users to modify transaction
@@ -125,7 +125,7 @@ const DEFAULT_BROWSER_TRACING_OPTIONS: BrowserTracingOptions = {
125
125
routingInstrumentation : instrumentRoutingWithDefaults ,
126
126
startTransactionOnLocationChange : true ,
127
127
startTransactionOnPageLoad : true ,
128
- _experiments : { enableLongTask : true , interactionSampleRate : 0.0 } ,
128
+ _experiments : { enableLongTask : true , enableInteractions : false } ,
129
129
...defaultRequestInstrumentationOptions ,
130
130
} ;
131
131
@@ -206,8 +206,8 @@ export class BrowserTracing implements Integration {
206
206
registerBackgroundTabDetection ( ) ;
207
207
}
208
208
209
- if ( _experiments ?. interactionSampleRate ?? 0 > 0 ) {
210
- this . _registerInteractionListener ( _experiments ?. interactionSampleRate ?? 0 ) ;
209
+ if ( _experiments ?. enableInteractions ) {
210
+ this . _registerInteractionListener ( ) ;
211
211
}
212
212
213
213
instrumentOutgoingRequests ( {
@@ -291,13 +291,10 @@ export class BrowserTracing implements Integration {
291
291
}
292
292
293
293
/** Start listener for interaction transactions */
294
- private _registerInteractionListener ( interactionSampleRate : number ) : void {
294
+ private _registerInteractionListener ( ) : void {
295
295
let inflightInteractionTransaction : IdleTransaction | undefined ;
296
296
const registerInteractionTransaction = ( ) : void => {
297
297
const { idleTimeout, finalTimeout, heartbeatInterval } = this . options ;
298
- if ( Math . random ( ) > interactionSampleRate ) {
299
- return ;
300
- }
301
298
302
299
const op = 'ui.action.click' ;
303
300
if ( inflightInteractionTransaction ) {
0 commit comments