change to prevent metric registration if device registration failed