For around 3-4 hours there were no historical stats for customers. This was caused by a misconfiguration of one of our stats pipeline components. This did not impact any core functionality.
One of our components reads stats from the pipeline and writes them to an Amazon RDS instance. This issue was fundamentally caused by one of our components not being updated to write stats to the correct database. This happened since we promoted a read replica to the master as part of an upgrade. This did not change the endpoint of the previous master. This component therefore kept writing to the now orphaned database.
The core issue was resolved by centralizing this point of configuration so we can change database endpoints for all our services that rely on them. The stats issue was resolved by importing the incorrectly written stats from the orphaned database and importing them into the new master, and then rerunning the stats aggregation jobs (these jobs produce the hourly/daily/weekly stats).