Better sanitization of metrics keys