ported the stats plugin to the metric subsystem