How to get alerts on gateway metrics

I've tried a bunch of things including a whole project into setting up Prometheus to scrape the prometheus endpoint - only to find out it exposes only some infra metrics and not the critical ones - api gateway and function stats are missing.
So now I'm again at a loss, I can't find any sensible way of setting up alerts for api or edge function error spikes.

Can anyone advise how to go about alerting on spikes in 40x or 50x responses from gateway, auth or edge functions?
Was this page helpful?