Don't use global variables. It's not necessary here. Everything can be done inside the MysqlStatsd class.