Fix metrics namespace and API changes