This moves the metrics query building to a separate interface in the naming package so that it can be used across providers.