Logging And Alerting in Android Tokopedia
Article Summary
Hendry Setiadi from Tokopedia reveals how they built a custom logging system that catches production issues before users even notice. Firebase Crashlytics is great, but what if you need more?
Tokopedia's Android team needed deeper insights than Firebase Crashlytics alone could provide. They built a custom logging system using Timber, Room, and WorkManager that captures detailed device attributes, handles offline scenarios, and sends real-time alerts to Slack when issues hit production thresholds.
Key Takeaways
- Timber centralizes all logging logic across modules with custom attributes
- Room stores logs locally to prevent data loss during poor connectivity
- WorkManager batches and sends logs to Scalyr for parsing and analysis
- Scalyr alerts trigger Slack notifications when error thresholds are breached
- Custom system adds device fingerprint, battery, and network data beyond Crashlytics
Tokopedia complements Firebase Crashlytics with a custom logging pipeline that provides richer device context, offline resilience, and faster incident response through automated alerting.
About This Article
Tokopedia's Android team needed interactive dashboards to filter, sort, and search logs by app version, OS version, error type, and severity. Firebase Crashlytics couldn't provide the level of customization they needed at their scale.
They built a custom logging pipeline. Timber handled centralized logging, Room stored logs locally in SQLite during offline periods, and WorkManager batched logs to send to Scalyr for parsing and field extraction.
With Scalyr's customizable parser and interactive dashboard, the team could click on log values to slice data different ways. This made root cause analysis faster and cut down the time it took to fix production incidents.