convert objects when sanitizing them for use as metric or source names