KeyError.  I was concerned about synchronizing access to the counter_metrics dictionary, since a flush may be going on at the same time as new stats are being composed.  I'll refine the "except".