Target endpoint for metrics url is now determined by the pathname of the URL instead of the entire URL. This is because the entire URL can contain query parameters that are not relevant for the metrics endpoint. Using the entire URL generates malformed URLs in some cases, such as when the URL contains query parameters as well.