Skip to content

Commit a3f235f

Browse files
move enableInp off experiment
1 parent 93f5c19 commit a3f235f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

packages/tracing-internal/src/browser/browserTracingIntegration.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ export interface BrowserTracingOptions extends RequestInstrumentationOptions {
107107
*/
108108
enableLongTask: boolean;
109109

110+
/**
111+
* If true, Sentry will capture INP web vitals as standalone spans .
112+
*
113+
* Default: false
114+
*/
115+
enableInp: boolean;
116+
110117
/**
111118
* _metricOptions allows the user to send options to change how metrics are collected.
112119
*
@@ -131,7 +138,6 @@ export interface BrowserTracingOptions extends RequestInstrumentationOptions {
131138
*/
132139
_experiments: Partial<{
133140
enableInteractions: boolean;
134-
enableInp: boolean;
135141
}>;
136142

137143
/**
@@ -147,6 +153,7 @@ const DEFAULT_BROWSER_TRACING_OPTIONS: BrowserTracingOptions = {
147153
instrumentPageLoad: true,
148154
markBackgroundSpan: true,
149155
enableLongTask: true,
156+
enableInp: false,
150157
_experiments: {},
151158
...defaultRequestInstrumentationOptions,
152159
};
@@ -188,7 +195,7 @@ export const browserTracingIntegration = ((_options: Partial<BrowserTracingOptio
188195

189196
/** Stores a mapping of interactionIds from PerformanceEventTimings to the origin interaction path */
190197
const interactionIdtoRouteNameMapping: InteractionRouteNameMapping = {};
191-
if (options._experiments.enableInp) {
198+
if (options.enableInp) {
192199
startTrackingINP(interactionIdtoRouteNameMapping);
193200
}
194201

@@ -403,7 +410,7 @@ export const browserTracingIntegration = ((_options: Partial<BrowserTracingOptio
403410
registerInteractionListener(options, latestRoute);
404411
}
405412

406-
if (_experiments.enableInp) {
413+
if (options.enableInp) {
407414
registerInpInteractionListener(interactionIdtoRouteNameMapping, latestRoute);
408415
}
409416

0 commit comments

Comments
 (0)