Browser Extension
Recording and cost
The Fuego panel in DevTools records a page's Firestore, Realtime Database, Storage and Auth calls from the moment it loads, with the documents each call read or wrote and an estimate of the reads, writes, deletes and cost behind them.
Start a Recording
Open DevTools on your web app, choose the Fuego panel and click Reload to record. The panel reloads the page with its recorder in place before the page’s own scripts run, so it sees every call from the page’s load: the listeners a page opens at start are often where most of its reads come from.
Until then the panel says Firebase on this page, not recording: a recorder added after the page loaded would miss what already happened, so the panel never starts halfway.
- While it records, the button reads Recording. Click it to reload the page and start a new Recording.
- Clear empties the list and the totals; the Recording goes on.
- Closing DevTools ends the Recording. A single-page app that changes its address without loading a new page stays in the same Recording. When the page reloads by itself or the tab loads another page, recording stops, but the panel keeps what it recorded (to read or export) and offers Reload to record for the new page.
- After Reload to record, the panel shows Reloading… until the new page arrives. If none comes within a few seconds (say the browser asked whether to leave the page, and you stayed), it offers Reload to record again.
- When a page sends more than the panel can read, the panel says how many messages it missed: the totals may then be low.
On the Firebase console and the Google Cloud console Fuego DevTools keeps its recorder running all the time, for the console extras. Open DevTools soon after the console loaded and the panel records it from its load without a reload; when the console reloads, a new Recording starts by itself. Open it later, and the panel offers Reload to record as anywhere else.
On the Google Cloud console, where Firestore Studio is, the recorder keeps only Firestore calls, those Firestore Studio makes for the documents you open included: a Recording there never shows Realtime Database, Storage or Auth calls. And since the recorder is on every page of that console, the panel may read Recording on a page that makes no Firestore calls at all.
What is recorded
| Kind | What shows |
|---|---|
| Firestore | Listeners (with a dot while they stay open), queries, document reads, writes, batches and transactions, and aggregations (count, sum, average), each with its path or query and the documents it received or wrote; pipeline queries, with only their number of results |
| Realtime DB | Listeners, reads and writes, with the bytes each one downloaded |
| Storage | Uploads, downloads, lists and metadata reads and changes, each with its operation class (A or B) and size. A file the page shows with an <img> tag loads without the Firebase SDK and does not show |
| Auth | Sign-in, token refresh and the other Auth calls, as events: never the tokens |
The panel recognises the Firebase emulators by their address and shows an Emulator chip in its toolbar.
Each row shows the time, the kind, the operation, its path, R / W / D (reads, writes and deletes; bytes for the Realtime Database and Storage) and its cost. Filter the list by kind (All, Firestore, Realtime DB, Storage, Auth), or type in Filter path, which also matches the operation and the database.
Click a row to see its detail on the right:
- Documents: every document the call received or wrote, with its fields and their Firestore types (a timestamp, a reference, a geopoint, bytes…) as they came, and what happened to it: added, modified, left the results, deleted, read, not found or written.
- Query: the operation, path, database, status and size, and the query as the JSON Fuego’s query builder uses.
- Code: the query as code, see Copy as code.
From the detail, Copy path copies the path, and Open in Fuego opens the document, collection or query in Fuego (see Opening things in Fuego).
The Auth tab shows the signed-in user the page holds and the Auth calls of the Recording: see the popup.
The cost estimate
Across the top of the Recording:
- Estimated cost of the Recording, in US dollars. It reads ≥ when part of the cost cannot be seen (see below); hover it for the reasons.
- ≈ per 1,000 visits: the Recording’s cost times a thousand, what a thousand visits like this one would cost.
- The reads, writes and deletes, the bytes downloaded from Realtime DB and the Storage operations.
- The settings behind the numbers: the database location, the edition, gross or after the free quota, and the date of the prices. Click it to change them.
Where the cost comes from opens a bar per collection, Realtime Database path and Storage bucket, the costliest first.
How it counts
The panel counts what Firebase bills, from the calls it sees:
| What happens | What it counts |
|---|---|
| A listener or a query receives a document | 1 read, for each listener: two listeners that receive the same document count it twice |
| A listener or a query returns nothing | 1 read |
| A document is deleted | No read |
| A document changes and leaves a listener’s results because it no longer matches | 1 read, for each listener |
| A count | 1 read per 1,000 documents counted, at least 1 |
| A sum or an average | At least 1 read: they bill one read per 1,000 index entries they scan, which the traffic does not show |
| A write, alone or in a batch or a transaction | 1 write or 1 delete per document |
| The Enterprise edition | One read unit, write unit or real-time update unit per document (a listener’s changes after its first results, a document leaving them included, are real-time update units): larger documents and what queries scan bill more, which the total marks with ≥ |
| The Realtime Database | The bytes downloaded (360 MiB a day are free for each project) |
| Storage | Class A and class B operations, and the bytes downloaded |
“At least”: some costs never show in the traffic. The total then reads ≥, and says why: a query with range filters on several fields, a vector search, a sum or an average, a pipeline query, or the Enterprise edition’s scans. Reads that your Security Rules make and the index entries a query reads never show at all, which the panel’s footer recalls.
On the emulators the estimate is “as production would bill it”. The Firestore emulator sends a listener’s whole results again on every change; production bills the first results, then only the documents that are new or changed. The panel counts the second way and shows what the emulator sent next to it. Realtime Database and Storage are counted as seen.
Cost settings
The Cost settings tab holds what the traffic cannot tell:
- Database location: where the Firestore database lives, which sets its
prices. Until you choose it, the estimate uses
nam5and the summary says “The database location is not visible in the traffic: choose it in Cost settings.” - Edition: Standard (the default) or Enterprise.
- Gross cost (ignore the free quota), on by default: other usage the same day may already have spent the daily free quota, and Google’s two pricing pages disagree on which database gets it. Turn it off to subtract the free quota; the summary then reads “after the free quota”.
The panel remembers these for each Firebase project, on this computer. The extension’s settings (Settings in the popup) hold the defaults for projects you have not set up yet.
The prices are Firebase’s public list prices in US dollars, bundled with the extension with the date they were read: estimating never makes a network call. Each release reads them again, and a release never ships prices more than 90 days old. Committed-use discounts lower the real cost by 20–40%; the estimate leaves them out.
Costs are estimates from public list prices: Security Rules reads and index entries are not visible. Your Firebase bill is the reference.
Related
- Export and Copy as code
- The popup: the project and the signed-in user behind a page
- Opening things in Fuego
- Emulators
