rest-gateway is meant for centralized routing of external API calls and should not be called by services running inside production.
PageViewInfo calls it through $wgPageViewInfoWikimediaEndpoint in WikimediaPageViewService.php
and maybe in other places.
Would it be possible to change that to calling the page-analytics and device-analytics services via the service mesh?