Instrumenting App Flows for Performance Monitoring
Article Summary
The Paytm Editorial Team reveals how they measure the real cost of user friction: tracking payment flows down to the millisecond, excluding network delays that mask app performance issues.
Paytm's engineering team faced a critical challenge: existing monitoring tools like Firebase couldn't separate app performance from API latency when tracking user flows. They needed to answer questions like 'How long does a QR payment actually take?' without network noise skewing the data.
Key Takeaways
- Built custom LogManager with pause/resume to exclude API time from performance traces
- Combined Firebase and Hawkeye platforms to overcome individual tool limitations
- Tracks parent and child traces across payment flows (e.g., UPI journey)
- Stack-based solution prevents duplicate logs when users navigate back and forth
Paytm engineered a hybrid tracing system that isolates pure app performance from network latency, giving them accurate flow-time measurements across millions of devices.
About This Article
Paytm needed to understand how its app performed on millions of iOS devices with varying capabilities. The problem was that Firebase and similar platforms kept logging during network calls, which meant API latency got mixed into the performance metrics. This made it hard to see what was actually happening in the app versus what was just slow internet.
Paytm built a custom LogManager with three trace classes: JRPerformanceTrace, JRHawkeyeTrace, and JRFIRTrace. These classes let engineers pause and resume logging around API calls. This way, they could measure app performance without network delays getting in the way. The logs then went to both Hawkeye and Firebase for analysis.
The system now captures real app performance during payment flows like UPI transactions. Engineers can track the full journey from 'upiClick_MTLandingScreenReady' to 'pinRetreived_transactionStatus' with millisecond precision. Network noise no longer distorts the timing data.