make metric registry global variable