updated to not create metrics objects unless needed.  this is to prevent getting stuck on unit tests due to metrics internals not preventing proper exit.