I have used Firebase Hosting to host a bunch of JS files. One JS file corresponds to one client So assume here is the structure
<domain.com>/1.js --> client1
<domain.com>/2.js --> client2
and so on.
I am on Blaze Plan (Pay as you go). I just want to set up alerts if the firebase hosting usage goes beyond a certain point. Here's my hosting usage looks like -
<domain.com>/1.js --> X
<domain.com>/2.js --> Y
I reached out to Firebase Support for this. They helped with an approach which kinda solved this problem. You can actually configure Billing Alerts per Service in Google Cloud Console.
Follow the steps mentioned in https://cloud.google.com/billing/docs/how-to/budgets and setup alerts.
For getting alerts at 20GB Hosting usage, you can simply setup billing alert at
20GB*0.15$/GB = 3$
Moreover, you can setup multiple alerts so that suffices the use case.