Open hemanth opened 5 months ago
As a user I don’t think I need a browser to do more spying on me… It’s already a privacy mess. Stop adding stuff like this, pretty please? And opt‐out is never enough, since most users will have no idea it’s happening in the first place.
What problem are you trying to solve?
Proposal for
window.realUserMetrics
Background
Understanding how real users experience your web application is crucial for improving performance and user satisfaction. Real User Monitoring (RUM) provides invaluable insight into frontend performance from the perspective of actual users. By correlating user journeys with synthetic tests, backend metrics, traces, logs, and network performance data, RUM enables the detection of poor user experiences and facilitates rapid issue resolution with comprehensive context from across the stack.
What Are You Trying to Solve?
The proposed
window.realUserMetrics
API aims to address several challenges faced by web developers and application operators in capturing and analyzing real user metrics:Limited Visibility into User Experience: Without real user metrics, developers have limited visibility into how users interact with their applications, making it difficult to identify performance bottlenecks and user experience issues.
Fragmented Monitoring Data: Existing tools often provide synthetic performance data or backend metrics in isolation, lacking a seamless correlation with actual user interactions. This fragmentation makes it challenging to get a holistic view of application performance.
Inefficient Issue Detection and Resolution: Without real user data, detecting and resolving performance issues can be slow and imprecise. Developers need a way to quickly identify and understand issues from the user's perspective.
Lack of Contextual Information: Resolving performance issues effectively requires context from various parts of the stack, including frontend, backend, network, and logs. A unified approach is needed to provide this comprehensive context.
Use Cases
The
window.realUserMetrics
API will enable the following scenarios:Performance Monitoring:
User Experience Analysis:
Issue Detection and Debugging:
Comprehensive Monitoring:
Conclusion
The
window.realUserMetrics
API addresses a critical need for capturing and analyzing real user metrics, providing comprehensive insight into application performance from the user's perspective. By focusing on key requirements and leveraging lessons from existing monitoring tools, we can introduce a robust and secure API that enhances the web platform's capabilities. This proposal aims to gather feedback and iterate towards a solution that meets developer needs while ensuring user privacy and performance efficiency.What solutions exist today?
None
How would you solve it?
Requirements
To meet these use cases, the
window.realUserMetrics
API must provide the following capabilities:Implementation Proposal
API Design
window.realUserMetrics.startTracking(options)
options
can include:metrics
: Specific performance metrics to track (e.g., load time, time to interactive).sessionID
: Identifier for the user session.window.realUserMetrics.stopTracking()
window.realUserMetrics.getMetrics()
Security Considerations
Performance Considerations
Anything else?
No response