Metrics Service Command Retry

Added logic to retry the Package statistics insert sql command. Also, added more tracing