Added error logging if any unexpected RuntimeExceptions occur during an attempt to public metrics.