How do you know your frontend is healthy in production? Describe the monitoring you would set up.
What the interviewer wants to hear
- Real user monitoring of Core Web Vitals (LCP, INP, CLS) by page, device and region
- Error tracking with source maps, release tags and user context such as Sentry
- Business and funnel metrics to catch silent failures
- Alerts and budgets tied to releases, plus synthetic checks for key journeys
- Respect privacy: no personal data in logs, and sampling to control cost
Model answer
Lab tools like Lighthouse are not enough, because real users have slower devices and networks. I collect real user monitoring with the web-vitals library, sending LCP, INP and CLS with attribution data, broken down by route, device type, country and release, and I watch the 75th percentile. For errors I use a tool like Sentry with uploaded source maps, release tags and breadcrumbs, so a new error can be traced to the deploy that caused it. Unhandled promise rejections and failed API calls are tracked too. Some failures are silent, so I also watch product metrics, like checkout completion or sign-up rate, which drop when a button stops working on one browser. Synthetic tests with Playwright run key journeys every few minutes against production. Alerts fire on error spikes or vitals regressions after a release, ideally linked to quick rollback. Throughout, I scrub personal data and use sampling to keep cost and privacy under control.
Can you answer it under time pressure?
Take a timed hard round and get scored on every answer.
More hard Frontend Developer questions
- How would you design and build a shared component library (design system) used by several product teams?
- A page must show a table with 50,000 rows and stay smooth while scrolling and filtering. How would you build it?
- What are the main security risks for a frontend application and how do you protect against them?
- Your company wants to split a large frontend into micro-frontends. What are the trade-offs and how would you approach it?
- What are React Server Components, and how do they change the way you build a React app?
- How would you design a web app that keeps working offline, for example for field workers with poor connectivity?
- You join a team with a large JavaScript React codebase. How would you migrate it to TypeScript without stopping feature work?
- How would you build the frontend for a real-time feature like a shared task board where many users edit at the same time?
- Users report that your single-page app becomes slow and crashes after being open for a few hours. How do you investigate and fix it?