Track costs in appstats.