Status
Approved
Date
2026-05-27
Context
WatchTower aims to provide lightweight frontend observability for:
- application performance
- user experience feedback
- operational diagnostics
The system requires a native way to accurately collect lighweight frontend page
WatchTower also requires:
- low-overhead (low latency) metric collection
- standardized browser timing data
- compatibility with modern browsers
- support for Real User Monitoring (RUM)
Decision
Use the browser-native Navigation Timing API as the primary mechanism for collecting frontend page load performance telemetry.
Rationale
- Enables collection of:
- Time To First Byte (TTFB)
- DOMContentLoaded timing
- full page load duration
- navigation type
- Requires no external SDKs
- Lightweight and supported by modern browsers
Alternatives Considered
Custom JavaScript Timing Logic
Rejected because manually measuring events is less accurate and harder to maintain.
Third-Party Observability SDKs
Rejected due to:
- dependency overhead
- marrying decision
- increased third party dependencies
- unnecessary complexity for current project scope
Resource Timing API Only
Rejected because Resource Timing focuses on asset timing rather than full page navigation metrics.
Consequences
Positive
- Lightweight implementation
- Accurate browser-native timing metrics
- No external dependency overhead
- Enables future RUM and performance dashboard features
Negative
- Browser support differences may require normalization logic
- Only captures navigation-level metrics
- Does not provide deeper interaction latency metrics alone
Conclusion
The Navigation Timing API was selected because it provides lightweight, standardized, and browser-native performance telemetry suitable for WatchTower’s frontend observability goals.