Monitoring
Monitoring Overview
Frontend monitoring - error tracking, real user monitoring, and observability
Frontend Monitoring
Frontend monitoring is essential for understanding application health, user experience, and identifying issues before they impact users.
Key Areas
| Area | Purpose | Key Metrics |
|---|---|---|
| Error Tracking | Capture and diagnose errors | Error rate, stack traces, affected users |
| Real User Monitoring (RUM) | Measure actual user experience | Core Web Vitals, page load times |
| Synthetic Monitoring | Proactive testing | Uptime, response times |
| Logging | Debug and audit trail | Log volume, error patterns |
Core Topics
Error Tracking
Capture, report, and debug frontend errors
Real User Monitoring
Core Web Vitals and actual user experience
Monitoring Tools
Comparison of Sentry, Datadog, New Relic, etc.
Event Tracking
Business event instrumentation, trend analysis, and threshold alerting
Self-Hosted Monitoring
Deploy a private business monitoring system with Grafana dashboards
Core Web Vitals
Google's Core Web Vitals are critical metrics that affect both UX and SEO:
| Metric | Description | Good Threshold |
|---|---|---|
| LCP (Largest Contentful Paint) | Loading performance | < 2.5s |
| INP (Interaction to Next Paint) | Interactivity | < 200ms |
| CLS (Cumulative Layout Shift) | Visual stability | < 0.1 |
Four Golden Signals
Essential signals for monitoring any distributed system:
| Signal | Description | Frontend Example |
|---|---|---|
| Latency | Time to complete requests | API response time, page load |
| Traffic | Amount of demand | Page views, API calls |
| Errors | Rate of failed requests | JS errors, failed fetches |
| Saturation | Resource utilization | Memory usage, CPU load |
Monitoring Strategy
┌─────────────────────────────────────────────────────────────┐
│ Frontend Monitoring │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Error │ │ RUM │ │ Synthetic │ │
│ │ Tracking │ │ Monitoring │ │ Monitoring │ │
│ │ │ │ │ │ │ │
│ │ • Exceptions │ │ • Web Vitals │ │ • Uptime │ │
│ │ • Crashes │ │ • Page Load │ │ • Smoke Test │ │
│ │ • Breadcrumbs│ │ • User Flow │ │ • Regression │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
│ └─────────────────┼─────────────────┘ │
│ ▼ │
│ ┌──────────────┐ │
│ │ Alerting │ │
│ │ & Alerts │ │
│ └──────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────┐ │
│ │ Dashboards │ │
│ │ & Reports │ │
│ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘Implementation Checklist
- Set up error tracking (Sentry, Bugsnag, etc.)
- Implement RUM for Core Web Vitals
- Configure alerting thresholds
- Create monitoring dashboards
- Set up synthetic monitoring for critical paths
- Document incident response procedures