@@ -107,6 +107,13 @@ export interface BrowserTracingOptions extends RequestInstrumentationOptions {
107
107
*/
108
108
enableLongTask : boolean ;
109
109
110
+ /**
111
+ * If true, Sentry will capture INP web vitals as standalone spans .
112
+ *
113
+ * Default: false
114
+ */
115
+ enableInp : boolean ;
116
+
110
117
/**
111
118
* _metricOptions allows the user to send options to change how metrics are collected.
112
119
*
@@ -131,7 +138,6 @@ export interface BrowserTracingOptions extends RequestInstrumentationOptions {
131
138
*/
132
139
_experiments : Partial < {
133
140
enableInteractions : boolean ;
134
- enableInp : boolean ;
135
141
} > ;
136
142
137
143
/**
@@ -147,6 +153,7 @@ const DEFAULT_BROWSER_TRACING_OPTIONS: BrowserTracingOptions = {
147
153
instrumentPageLoad : true ,
148
154
markBackgroundSpan : true ,
149
155
enableLongTask : true ,
156
+ enableInp : false ,
150
157
_experiments : { } ,
151
158
...defaultRequestInstrumentationOptions ,
152
159
} ;
@@ -188,7 +195,7 @@ export const browserTracingIntegration = ((_options: Partial<BrowserTracingOptio
188
195
189
196
/** Stores a mapping of interactionIds from PerformanceEventTimings to the origin interaction path */
190
197
const interactionIdtoRouteNameMapping : InteractionRouteNameMapping = { } ;
191
- if ( options . _experiments . enableInp ) {
198
+ if ( options . enableInp ) {
192
199
startTrackingINP ( interactionIdtoRouteNameMapping ) ;
193
200
}
194
201
@@ -403,7 +410,7 @@ export const browserTracingIntegration = ((_options: Partial<BrowserTracingOptio
403
410
registerInteractionListener ( options , latestRoute ) ;
404
411
}
405
412
406
- if ( _experiments . enableInp ) {
413
+ if ( options . enableInp ) {
407
414
registerInpInteractionListener ( interactionIdtoRouteNameMapping , latestRoute ) ;
408
415
}
409
416
0 commit comments