makes custom metric keys more robust