Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View Cloud Firestore query/command history

I am coding a Flutter app and using Cloud Firestore as DB. I am still in the development phase, but if I go to quota it looks like I have some serious traffic on API calls (5000+ per day) and up to 2000 fetched objects.

These numbers look oddly high to me, and I have few hypothesis, but I don't have any tool to investigate: is there a way to browse the history of the issued calls/commands to Cloud Firestore? It would be nice to have the auth.uid of the call issuer and some other details (time, location, etc.).


Notice: I know I could implement something like that myself, using a Firebase Function, but I'd rather rely on provider-side infos and at this moment such overhead would be killing my efforts for days.

like image 267
Fabio Veronese Avatar asked Jan 19 '18 22:01

Fabio Veronese


People also ask

Is firestore cached?

Cloud Firestore supports offline data persistence. This feature caches a copy of the Cloud Firestore data that your app is actively using, so your app can access the data when the device is offline. You can write, read, listen to, and query the cached data.

How do I get all the Subcollection in firestore?

Just enter a document path in the dedicated field and click the button “Get Subcollections”: If the document has one or more subcollections the page will display their id(s). If the document at the path does not exist or if it does not have any subcollection, the Cloud Function will return an empty array.

How do I get most recent documents on firestore?

Is there any way to get the last created document in Firebase Firestore collection? Yes, there is! The simplest way to achieve this is to add a date property to each object in your collection, then simply query it according to this new property descending and call limit(1) function. That's it!


1 Answers

Firebase employee here

There is no way to get a report of the queries that were made to Firestore. You'll have to find a way to log those on your own.

like image 153
Doug Stevenson Avatar answered Oct 08 '22 23:10

Doug Stevenson