-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Coming from a proposal in Slack here
Background
INP (Interaction to Next Paint) is a core Web Vitals metric that measures how long the UI remains unresponsive after a user interaction — capturing the real, user-perceived responsiveness of the product.
Recommended thresholds (75th percentile) https://web.dev/articles/inp:
- ≤ 200 ms — good
- 200–500 ms — needs improvement
- over 500 ms — poor
Across our production environment, over the last 14 days Sentry recorded 71,000 user interactions, with a 75th percentile INP of 552.84 ms, placing our responsiveness firmly in the “poor” range.
Problem
Many interactive elements in the app cause the browser to freeze for 500+ ms before updating the UI or showing a loading state. This delay makes users unsure whether their action was registered or whether the application is performing the task they requested.
Solution
Expand our Sentry workflow to systematically identify and improve slow user interactions, with a clear focus on reducing INP:
- Improve element labeling in Sentry
- Replace auto-generated selectors with meaningful labels to accurately map INP events to specific UI elements.
- For example, the element div.css-146c3p1.r-1udh08x.r-1udbk01.r-1iln25a on /search currently represents more than five different user actions, making meaningful analysis extremely difficult.
- We still need to determine the best implementation approach, but the plan is to test Sentry’s automatic component labeling for React (https://docs.sentry.io/platforms/javascript/guides/react/features/component-names/) and explore a solution for custom labels where automatic labeling is insufficient.
- Identify the slowest and most frequent interactions
- Use Sentry’s INP data to determine which actions are both common and slow, and create focused GitHub issues for each problematic interaction.
- Optimize each interaction
- Fix INP issues by addressing the specific bottlenecks that cause long freezes after user actions.
- Refactor and improve the overall performance and quality of the components involved in frequently used interactions, ensuring they deliver better real-world responsiveness.
- Verify improvements by re-checking the INP metric in Sentry for each optimized interaction.
Below I’m including a screenshot of the currently most problematic interactions.
Metadata
Metadata
Labels
Type
Projects
Status