Tokopedia Nov 27, 2020

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

Critical Insight

Tokopedia complements Firebase Crashlytics with a custom logging pipeline that provides richer device context, offline resilience, and faster incident response through automated alerting.

The article includes the exact code snippets for implementing each component, from Timber tree planting to WorkManager batch sending.

About This Article

Problem

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.

Solution

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.

Impact

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.