openHook to do all metric registration in one function